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

This commit is contained in:
jean 2016-06-04 11:41:49 +02:00
commit 0d115e0ed0
14 changed files with 221 additions and 172 deletions

View File

@ -77,20 +77,20 @@ if (preg_match('/del_(.*)/',$action,$reg))
if ($action == 'add_currency')
{
$code = GETPOST('code', 'alpha');
$name = GETPOST('name', 'alpha');
$rate = GETPOST('rate', 'alpha');
$langs->loadCacheCurrencies('');
$code = GETPOST('code', 'alpha');
$rate = GETPOST('rate', 'alpha');
$currency = new MultiCurrency($db);
$currency->code = $code;
$currency->name = $name;
$currency->name = !empty($langs->cache_currencies[$code]['label']) ? $langs->cache_currencies[$code]['label'].' ('.$langs->getCurrencySymbol($code).')' : $code;
if ($currency->create($user) > 0)
{
if ($currency->addRate($rate)) setEventMessages($langs->trans('RecordSaved'), array());
else setEventMessages($langs->trans('ErrorAddRateFail'), array(), 'errors');
}
else setEventMessages($langs->trans('ErrorAddCurrencyFail'), array());
else setEventMessages($langs->trans('ErrorAddCurrencyFail'), $currency->errors, 'errors');
}
elseif ($action == 'update_currency')
{
@ -182,6 +182,7 @@ print '<td>'.$langs->trans("Parameters").'</td>'."\n";
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="center" width="100">'.$langs->trans("Value").'</td>'."\n";
/* TODO uncomment when the functionality will integrated
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_useRateOnInvoiceDate").'</td>';
@ -194,6 +195,7 @@ print $form->selectyesno("MULTICURRENCY_USE_RATE_ON_INVOICE_DATE",$conf->global-
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</form>';
print '</td></tr>';
*/
$var=!$var;
print '<tr '.$bc[$var].'>';
@ -208,6 +210,7 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
print '</form>';
print '</td></tr>';
/* TODO uncomment when the functionality will integrated
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_buyPriceInCurrency").'</td>';
@ -220,7 +223,9 @@ print $form->selectyesno("MULTICURRENCY_BUY_PRICE_IN_CURRENCY",$conf->global->MU
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</form>';
print '</td></tr>';
*/
/* TODO uncomment when the functionality will integrated
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_modifyRateApplication").'</td>';
@ -234,71 +239,75 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
print '</form>';
print '</td></tr>';
print '</table>';
print '<br />';
$var=false;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("CurrencyLayerAccount").'</td>'."\n";
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="100">';
print '<form id="form_sync" action="" method="POST">';
print '<input type="hidden" name="action" value="synchronize" />';
print '<textarea id="response" class="hideobject" name="response"></textarea>';
print $langs->trans("Value").'&nbsp;<input type="button" id="bt_sync" class="button" onclick="javascript:getRates();" value="'.$langs->trans('Synchronize').'" />';
print '</form>';
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td><a target="_blank" href="https://currencylayer.com">'.$langs->transnoentitiesnoconv("multicurrency_appId").'</a></td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="400">';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="set_MULTICURRENCY_APP_ID">';
print '<input type="text" name="MULTICURRENCY_APP_ID" value="'.$conf->global->MULTICURRENCY_APP_ID.'" size="28" />&nbsp;';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</form>';
print '</td></tr>';
/* This property seems not used in code, so i comment it
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_appCurrencySource").'</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="400">';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="set_MULTICURRENCY_APP_SOURCE">';
print '<input type="text" name="MULTICURRENCY_APP_SOURCE" value="'.$conf->global->MULTICURRENCY_APP_SOURCE.'" size="10" placeholder="USD" />&nbsp;'; // Default: USD
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</form>';
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_alternateCurrencySource").'</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="400">';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="set_MULTICURRENCY_ALTERNATE_SOURCE">';
print '<input type="text" name="MULTICURRENCY_ALTERNATE_SOURCE" value="'.$conf->global->MULTICURRENCY_ALTERNATE_SOURCE.'" size="10" placeholder="EUR" />&nbsp;'; // Example: EUR
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</form>';
print '</td></tr>';
*/
print '</table>';
print '<br />';
if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
{
$var=false;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$form->textwithpicto($langs->trans("CurrencyLayerAccount"), $langs->trans("CurrencyLayerAccount_help_to_synchronize")).'</td>'."\n";
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="100">';
print '<form id="form_sync" action="" method="POST">';
print '<input type="hidden" name="action" value="synchronize" />';
print '<textarea id="response" class="hideobject" name="response"></textarea>';
print $langs->trans("Value").'&nbsp;<input type="button" id="bt_sync" class="button" onclick="javascript:getRates();" value="'.$langs->trans('Synchronize').'" />';
print '</form>';
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td><a target="_blank" href="https://currencylayer.com">'.$langs->transnoentitiesnoconv("multicurrency_appId").'</a></td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="400">';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="set_MULTICURRENCY_APP_ID">';
print '<input type="text" name="MULTICURRENCY_APP_ID" value="'.$conf->global->MULTICURRENCY_APP_ID.'" size="28" />&nbsp;';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</form>';
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_appCurrencySource").'</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="400">';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="set_MULTICURRENCY_APP_SOURCE">';
print '<input type="text" name="MULTICURRENCY_APP_SOURCE" value="'.$conf->global->MULTICURRENCY_APP_SOURCE.'" size="10" placeholder="USD" />&nbsp;'; // Default: USD
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</form>';
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_alternateCurrencySource").'</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="400">';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="set_MULTICURRENCY_ALTERNATE_SOURCE">';
print '<input type="text" name="MULTICURRENCY_ALTERNATE_SOURCE" value="'.$conf->global->MULTICURRENCY_ALTERNATE_SOURCE.'" size="10" placeholder="EUR" />&nbsp;'; // Example: EUR
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</form>';
print '</td></tr>';
print '</table>';
print '<br />';
}
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Currencies").'</td>'."\n";
print '<td>'.$form->textwithpicto($langs->trans("CurrenciesUsed"), $langs->transnoentitiesnoconv("CurrenciesUsed_help_to_add")).'</td>'."\n";
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="center" width="100">'.$langs->trans("Rate").'</td>'."\n";
@ -307,7 +316,7 @@ print '<tr '.$bc[$var].'>';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add_currency">';
print '<td><input type="text" name="code" value="" size="5" placeholder="'.$langs->trans('code').'" /> - <input type="text" name="name" value="" size="35" placeholder="'.$langs->trans('name').'" /></td>';
print '<td>'.$form->selectCurrency('', 'code').'</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="300">';
print '<input type="text" name="rate" value="" size="13" placeholder="'.$langs->trans('rate').'" />&nbsp;';

View File

@ -1433,7 +1433,7 @@ if ($action == 'create')
print '<td>'.fieldLabel('Currency','multicurrency_code').'</td>';
print '<td colspan="3" class="maxwidthonsmartphone">';
$currency_code = (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : ($object->multicurrency_code ? $object->multicurrency_code : $conf->currency));
print $form->selectMultiCurrency($currency_code, 'multicurrency_code', 1);
print $form->selectMultiCurrency($currency_code, 'multicurrency_code', 0);
print '</td></tr>';
}

View File

@ -3812,7 +3812,7 @@ class Form
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
print '<tr><td>';
print $this->selectMultiCurrency($selected, $htmlname, 1);
print $this->selectMultiCurrency($selected, $htmlname, 0);
print '</td>';
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print '</tr></table></form>';
@ -4091,7 +4091,7 @@ class Form
$out='';
$out.= '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
if ($useempty) $out .= '<option value="'.$conf->currency.'"'.((empty($selected) || $selected == $conf->currency)?' selected="selected"':'').'>'.$langs->cache_currencies[$conf->currency]['label'].'</option>';
if ($useempty) $out .= '<option value=""></option>';
if (count($TCurrency) > 0)
{
foreach ($langs->cache_currencies as $code_iso => $currency)

View File

@ -2,8 +2,8 @@
Foundation=Foundation
Version=Version
VersionProgram=Version program
VersionLastInstall=Version initial install
VersionLastUpgrade=Version last upgrade
VersionLastInstall=Initial install version
VersionLastUpgrade=Latest version upgrade
VersionExperimental=Experimental
VersionDevelopment=Development
VersionUnknown=Unknown
@ -145,8 +145,8 @@ Boxes=Widgets
MaxNbOfLinesForBoxes=Max number of lines for widgets
PositionByDefault=Default order
Position=Position
MenusDesc=Menus managers define content of the 2 menu bars (horizontal bar and vertical bar).
MenusEditorDesc=The menu editor allow you to define personalized entries in menus. Use it carefully to avoid making dolibarr unstable and menu entries permanently unreachable.<br>Some modules add entries in the menus (in menu <b>All</b> in most cases). If you removed some of these entries by mistake, you can restore them by disabling and reenabling the module.
MenusDesc=Menu managers set content of the two menu bars (horizontal and vertical).
MenusEditorDesc=The menu editor allows you to define custom menu entries. Use it carefully to avoid instability and permanently unreachable menu entries.<br />Some modules add menu entries (in menu <b>All</b> mostly). If you remove some of these entries by mistake, you can restore them disabling and reenabling the module.
MenuForUsers=Menu for users
LangFile=.lang file
System=System
@ -154,13 +154,13 @@ SystemInfo=System information
SystemToolsArea=System tools area
SystemToolsAreaDesc=This area provides administration features. Use the menu to choose the feature you're looking for.
Purge=Purge
PurgeAreaDesc=This page allows you to delete all files built or stored by Dolibarr (temporary files or all files in <b>%s</b> directory). Using this feature is not necessary. It is provided for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files built by the web server.
PurgeDeleteLogFile=Delete log file <b>%s</b> defined for Syslog module (no risk to loose data)
PurgeDeleteTemporaryFiles=Delete all temporary files (no risk to loose data)
PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> directory). Using this feature is not necessary. It is provided as a workaround for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files generated by the web server.
PurgeDeleteLogFile=Delete log file <b>%s</b> defined for Syslog module (no risk of losing data)
PurgeDeleteTemporaryFiles=Delete all temporary files (no risk of losing data)
PurgeDeleteTemporaryFilesShort=Delete temporary files
PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory <b>%s</b>. Temporary files but also database backup dumps, files attached to elements (third parties, invoices, ...) and uploaded into the ECM module will be deleted.
PurgeRunNow=Purge now
PurgeNothingToDelete=No directory or file to delete.
PurgeNothingToDelete=No directory or files to delete.
PurgeNDirectoriesDeleted=<b>%s</b> files or directories deleted.
PurgeAuditEvents=Purge all security events
ConfirmPurgeAuditEvents=Are you sure you want to purge all security events ? All security logs will be deleted, no other data will be removed.
@ -210,12 +210,12 @@ OnlyActiveElementsAreShown=Only elements from <a href="%s">enabled modules</a> a
ModulesDesc=Dolibarr modules define which functionality is enabled in software. Some modules require permissions you must grant to users, after enabling module. Click on button on/off in column "Status" to enable a module/feature.
ModulesInterfaceDesc=The Dolibarr modules interface allows you to add features depending on external software, systems or services.
ModulesSpecialDesc=Special modules are very specific or seldom used modules.
ModulesJobDesc=Business modules provide simple predefined setup of Dolibarr for a particular business.
ModulesMarketPlaceDesc=You can find more modules to download on external web sites on the Internet...
ModulesJobDesc=Business modules provide simple preconfigured setup of Dolibarr for specific businesses.
ModulesMarketPlaceDesc=You can find more modules to download on external websites on the Internet...
ModulesMarketPlaces=More modules...
DoliStoreDesc=DoliStore, the official market place for Dolibarr ERP/CRM external modules
DoliPartnersDesc=List with some companies that can provide/develop on-demand modules or features (Note: any Open Source company knowning PHP language can provide you specific development)
WebSiteDesc=Web site providers you can search to find more modules...
DoliPartnersDesc=List of companies providing custom developed modules or features (Note: anyone experienced in PHP programming can provide custom development for an open source project)
WebSiteDesc=Reference websites to find more modules...
URL=Link
BoxesAvailable=Widgets available
BoxesActivated=Widgets activated
@ -312,8 +312,8 @@ InfDirAlt=Since version 3 it is possible to define an alternative root directory
InfDirExample=<br>Then declare it in the file conf.php<br> $dolibarr_main_url_root_alt='http://myserver/custom'<br>$dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'<br>*These lines are commented with "#", to uncomment only remove the character.
YouCanSubmitFile=For this step, you can send package using this tool: Select module file
CurrentVersion=Dolibarr current version
CallUpdatePage=Go to the page that updates the database structure and datas: %s.
LastStableVersion=Last stable version
CallUpdatePage=Go to the page that updates the database structure and data: %s.
LastStableVersion=Latest stable version
UpdateServerOffline=Update server offline
GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:<br><b>{000000}</b> corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> same as previous but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br>
GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.<br><b>{tttt}</b> The code of thirdparty type on n characters (see dictionary-thirdparty types).<br>
@ -367,7 +367,7 @@ PDFAddressForging=Rules to forge address boxes
HideAnyVATInformationOnPDF=Hide all information related to VAT on generated PDF
HideDescOnPDF=Hide products description on generated PDF
HideRefOnPDF=Hide products ref. on generated PDF
HideDetailsOnPDF=Hide products lines details on generated PDF
HideDetailsOnPDF=Hide product lines details on generated PDF
PlaceCustomerAddressToIsoLocation=Use french standard position (La Poste) for customer address position
Library=Library
UrlGenerationParameters=Parameters to secure URLs
@ -401,8 +401,8 @@ ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value<br><br> fo
ExtrafieldParamHelpradio=Parameters list have to be like key,value<br><br> for example : <br>1,value1<br>2,value2<br>3,value3<br>...
ExtrafieldParamHelpsellist=Parameters list comes from a table<br>Syntax : table_name:label_field:id_field::filter<br>Example : c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another :<br>c_typent:libelle:id:parent_list_code|parent_column:filter
ExtrafieldParamHelpchkbxlst=Parameters list comes from a table<br>Syntax : table_name:label_field:id_field::filter<br>Example : c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another :<br>c_typent:libelle:id:parent_list_code|parent_column:filter
ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax : ObjectName:Classpath<br>Example : Societe:societe/class/societe.class.php
LibraryToBuildPDF=Library used to build PDF
ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax : ObjectName:Classpath<br>Example : Societe:societe/class/societe.class.php
LibraryToBuildPDF=Library used for PDF generation
WarningUsingFPDF=Warning: Your <b>conf.php</b> contains directive <b>dolibarr_pdf_force_fpdf=1</b>. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.<br>To solve this and have a full support of PDF generation, please download <a href="http://www.tcpdf.org/" target="_blank">TCPDF library</a>, then comment or remove the line <b>$dolibarr_pdf_force_fpdf=1</b>, and add instead <b>$dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir'</b>
LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:<br>1 : local tax apply on products and services without vat (localtax is calculated on amount without tax)<br>2 : local tax apply on products and services including vat (localtax is calculated on amount + main tax)<br>3 : local tax apply on products without vat (localtax is calculated on amount without tax)<br>4 : local tax apply on products including vat (localtax is calculated on amount + main vat)<br>5 : local tax apply on services without vat (localtax is calculated on amount without tax)<br>6 : local tax apply on services including vat (localtax is calculated on amount + tax)
SMS=SMS
@ -424,12 +424,12 @@ AllBarcodeReset=All barcode values have been removed
NoBarcodeNumberingTemplateDefined=No numbering barcode template enabled into barcode module setup.
NoRecordWithoutBarcodeDefined=No record with no barcode value defined.
EnableFileCache=Enable file cache
ShowDetailsInPDFPageFoot=Add more details into footer of PDF files, like your company address, or manager names (to complete professional ids, capital and VAT number).
ShowDetailsInPDFPageFoot=Add more details into footer of PDF files, like your company address, or manager names (to complete professional ids, company capital and VAT number).
NoDetails=No more details in footer
DisplayCompanyInfo=Display company address
DisplayCompanyManager=Display manager names
DisplayCompanyInfoAndManagers=Display company and manager names
DisplayCompanyInfoAndManagers=Display company and manager names
# Modules
Module0Name=Users & groups
Module0Desc=Users and groups management
@ -492,15 +492,15 @@ Module200Desc=LDAP directory synchronisation
Module210Name=PostNuke
Module210Desc=PostNuke integration
Module240Name=Data exports
Module240Desc=Tool to export Dolibarr datas (with assistants)
Module240Desc=Tool to export Dolibarr data (with assistants)
Module250Name=Data imports
Module250Desc=Tool to import datas in Dolibarr (with assistants)
Module250Desc=Tool to import data in Dolibarr (with assistants)
Module310Name=Members
Module310Desc=Foundation members management
Module320Name=RSS Feed
Module320Desc=Add RSS feed inside Dolibarr screen pages
Module330Name=Bookmarks
Module330Desc=Bookmark management
Module330Desc=Bookmarks management
Module400Name=Projects/Opportunities/Leads
Module400Desc=Management of projects, opportunities or leads. You can then assign any element (invoice, order, proposal, intervention, ...) to a project and get a transversal view from the project view.
Module410Name=Webcalendar
@ -549,7 +549,7 @@ Module2800Desc=FTP Client
Module2900Name=GeoIPMaxmind
Module2900Desc=GeoIP Maxmind conversions capabilities
Module3100Name=Skype
Module3100Desc=Add a Skype button into card of users / third parties / contacts / members
Module3100Desc=Add a Skype button into users / third parties / contacts / members cards
Module4000Name=HRM
Module4000Desc=Human resources management
Module5000Name=Multi-company
@ -607,7 +607,7 @@ Permission71=Read members
Permission72=Create/modify members
Permission74=Delete members
Permission75=Setup types of membership
Permission76=Export datas
Permission76=Export data
Permission78=Read subscriptions
Permission79=Create/modify subscriptions
Permission81=Read customers orders
@ -817,15 +817,15 @@ Permission55002=Create/modify polls
Permission59001=Read commercial margins
Permission59002=Define commercial margins
Permission59003=Read every user margin
DictionaryCompanyType=Thirdparties type
DictionaryCompanyJuridicalType=Juridical kinds of thirdparties
DictionaryCompanyType=Types of thirdparties
DictionaryCompanyJuridicalType=Legal forms of thirdparties
DictionaryProspectLevel=Prospect potential level
DictionaryCanton=State/Province
DictionaryRegion=Regions
DictionaryCountry=Countries
DictionaryCurrency=Currencies
DictionaryCivility=Civility title
DictionaryActions=Type of agenda events
DictionaryCivility=Personal and professional titles
DictionaryActions=Types of agenda events
DictionarySocialContributions=Social or fiscal taxes types
DictionaryVAT=VAT Rates or Sales Tax Rates
DictionaryRevenueStamp=Amount of revenue stamps
@ -834,7 +834,7 @@ DictionaryPaymentModes=Payment modes
DictionaryTypeContact=Contact/Address types
DictionaryEcotaxe=Ecotax (WEEE)
DictionaryPaperFormat=Paper formats
DictionaryFees=Type of fees
DictionaryFees=Types of fees
DictionarySendingMethods=Shipping methods
DictionaryStaff=Staff
DictionaryAvailability=Delivery delay
@ -845,14 +845,14 @@ DictionaryAccountancysystem=Models for chart of accounts
DictionaryEMailTemplates=Emails templates
DictionaryUnits=Units
DictionaryProspectStatus=Prospection status
DictionaryHolidayTypes=Type of leaves
DictionaryHolidayTypes=Types of leaves
DictionaryOpportunityStatus=Opportunity status for project/lead
SetupSaved=Setup saved
BackToModuleList=Back to modules list
BackToDictionaryList=Back to dictionaries list
VATReceivedOnly=Special rate not charged
VATManagement=VAT Management
VATIsUsedDesc=The VAT rate by default when creating prospects, invoices, orders etc follow the active standard rule:<br>If the seller is not subjected to VAT, then VAT by default=0. End of rule.<br>If the (selling country= buying country), then the VAT by default=VAT of the product in the selling country. End of rule. <br>If seller and buyer in the European Community and goods are transport products (car, ship, plane), the default VAT=0 ( The VAT should be paid by the buyer at the customoffice of his country and not at the seller). End of rule.<br>If seller and buyer in the European Community and buyer is not a company, then the VAT by default=VAT of product sold. End of rule.<br>If seller and buyer in the European Community and buyer is a company, then the VAT by default=0. End of rule.<br>Else the proposed default VAT=0. End of rule.
VATIsUsedDesc=By default when creating prospects, invoices, orders etc the VAT rate follows the active standard rule:<br>If the seller is not subjected to VAT, then VAT defaults to 0. End of rule.<br>If the (selling country= buying country), then the VAT by default equals the VAT of the product in the selling country. End of rule. <br>If seller and buyer are both in the European Community and goods are transport products (car, ship, plane), the default VAT is 0 ( The VAT should be paid by the buyer to the customoffice of his country and not to the seller). End of rule.<br>If seller and buyer are both in the European Community and the buyer is not a company, then the VAT by defaults to the VAT of the product sold. End of rule.<br>If seller and buyer are both in the European Community and the buyer is a company, then the VAT is 0 by default . End of rule.<br>In any othe case the proposed default is VAT=0. End of rule.
VATIsNotUsedDesc=By default the proposed VAT is 0 which can be used for cases like associations, individuals ou small companies.
VATIsUsedExampleFR=In France, it means companies or organisations having a real fiscal system (Simplified real or normal real). A system in which VAT is declared.
VATIsNotUsedExampleFR=In France, it means associations that are non VAT declared or companies, organisations or liberal professions that have chosen the micro enterprise fiscal system (VAT in franchise) and paid a franchise VAT without any VAT declaration. This choice will display the reference "Non applicable VAT - art-293B of CGI" on invoices.
@ -1000,13 +1000,13 @@ SetupDescription5=Other menu entries manage optional parameters.
EventsSetup=Setup for events logs
LogEvents=Security audit events
Audit=Audit
InfoDolibarr=Infos Dolibarr
InfoBrowser=Infos Browser
InfoOS=Infos OS
InfoWebServer=Infos web server
InfoDatabase=Infos database
InfoPHP=Infos PHP
InfoPerf=Infos performances
InfoDolibarr=About Dolibarr
InfoBrowser=About Browser
InfoOS=About OS
InfoWebServer=About Web Server
InfoDatabase=About Database
InfoPHP=About PHP
InfoPerf=About Performances
BrowserName=Browser name
BrowserOS=Browser OS
ListEvents=Audit events
@ -1030,7 +1030,7 @@ TriggerDisabledAsModuleDisabled=Triggers in this file are disabled as module <b>
TriggerAlwaysActive=Triggers in this file are always active, whatever are the activated Dolibarr modules.
TriggerActiveAsModuleActive=Triggers in this file are active as module <b>%s</b> is enabled.
GeneratedPasswordDesc=Define here which rule you want to use to generate new password if you ask to have auto generated password
DictionaryDesc=Define here all reference datas. You can complete predefined value with yours.
DictionaryDesc=Insert all reference data. You can add your values to the default.
ConstDesc=This page allows you to edit all other parameters not available in previous pages. They are reserved parameters for advanced developers or for troubleshouting.
OnceSetupFinishedCreateUsers=Warning, you are a Dolibarr administrator user. Administrator users are used to setup Dolibarr. For a usual usage of Dolibarr, it is recommended to use a non administrator user created from Users & Groups menu.
MiscellaneousDesc=Define here all other parameters related to security.

View File

@ -81,8 +81,8 @@ AgendaUrlOptions2=<b>login=%s</b> to restrict output to actions created by or as
AgendaUrlOptions3=<b>logina=%s</b> to restrict output to actions owned by a user <b>%s</b>.
AgendaUrlOptions4=<b>logint=%s</b> to restrict output to actions assigned to user <b>%s</b>.
AgendaUrlOptionsProject=<b>project=PROJECT_ID</b> to restrict output to actions associated to project <b>PROJECT_ID</b>.
AgendaShowBirthdayEvents=Show birthday's contacts
AgendaHideBirthdayEvents=Hide birthday's contacts
AgendaShowBirthdayEvents=Show birthdays of contacts
AgendaHideBirthdayEvents=Hide birthdays of contacts
Busy=Busy
ExportDataset_event1=List of agenda events
DefaultWorkingDays=Default working days range in week (Example: 1-5, 1-6)
@ -110,4 +110,4 @@ EveryWeek=Every week
EveryMonth=Every month
DayOfMonth=Day of month
DayOfWeek=Day of week
DateStartPlusOne=Date start + 1 hour
DateStartPlusOne=Date start + 1 hour

View File

@ -319,7 +319,7 @@ FrequencyPer_m=Every %s months
FrequencyPer_y=Every %s years
toolTipFrequency=Examples:<br /><b>Set 7 / day</b>: give a new invoice every 7 days<br /><b>Set 3 / month</b>: give a new invoice every 3 month
NextDateToExecution=Date for next invoice generation
DateLastGeneration=Date of last generation
DateLastGeneration=Date of latest generation
MaxPeriodNumber=Max nb of invoice generation
NbOfGenerationDone=Nb of invoice generation already done
InvoiceAutoValidate=Validate invoices automatically

View File

@ -16,8 +16,8 @@ Rendez-Vous=Rendezvous
ConfirmDeleteAction=Are you sure you want to delete this event ?
CardAction=Event card
PercentDone=Percentage complete
ActionOnCompany=Event about company
ActionOnContact=Event about contact
ActionOnCompany=Related company
ActionOnContact=Related contact
TaskRDV=Meetings
TaskRDVWith=Meeting with %s
ShowTask=Show task

View File

@ -343,7 +343,7 @@ VATIntraCheckableOnEUSite=Check Intracomunnautary VAT on European commision site
VATIntraManualCheck=You can also check manually from european web site <a href="%s" target="_blank">%s</a>
ErrorVATCheckMS_UNAVAILABLE=Check not possible. Check service is not provided by the member state (%s).
NorProspectNorCustomer=Nor prospect, nor customer
JuridicalStatus=Juridical status
JuridicalStatus=Legal form
Staff=Staff
ProspectLevelShort=Potential
ProspectLevel=Prospect potential
@ -370,12 +370,12 @@ TE_PRIVATE=Private individual
TE_OTHER=Other
StatusProspect-1=Do not contact
StatusProspect0=Never contacted
StatusProspect1=To contact
StatusProspect1=To be contacted
StatusProspect2=Contact in process
StatusProspect3=Contact done
ChangeDoNotContact=Change status to 'Do not contact'
ChangeNeverContacted=Change status to 'Never contacted'
ChangeToContact=Change status to 'To contact'
ChangeToContact=Change status to 'To be contacted'
ChangeContactInProcess=Change status to 'Contact in process'
ChangeContactDone=Change status to 'Contact done'
ProspectsByStatus=Prospects by status
@ -400,23 +400,23 @@ DeliveriesAddress=Delivery addresses
DeliveryAddress=Delivery address
DeliveryAddressLabel=Delivery address label
DeleteDeliveryAddress=Delete a delivery address
ConfirmDeleteDeliveryAddress=Are you sure you want to delete this delivery address?
ConfirmDeleteDeliveryAddress=Are you sure you want to delete this delivery address ?
NewDeliveryAddress=New delivery address
AddDeliveryAddress=Create address
AddAddress=Create address
AddDeliveryAddress=Add delivery address
AddAddress=Add address
NoOtherDeliveryAddress=No alternative delivery address defined
SupplierCategory=Supplier category
JuridicalStatus200=Independant
JuridicalStatus200=Independent
DeleteFile=Delete file
ConfirmDeleteFile=Are you sure you want to delete this file?
AllocateCommercial=Assigned to sale representative
AllocateCommercial=Assigned to sales representative
SelectCountry=Select a country
SelectCompany=Select a third party
Organization=Organization
AutomaticallyGenerated=Automatically generated
FiscalYearInformation=Information on the fiscal year
FiscalMonthStart=Starting month of the fiscal year
YouMustCreateContactFirst=You must create emails contacts for third party first to be able to add emails notifications.
YouMustCreateContactFirst=To be able to add email notifications, you must first insert email contacts for the third party
ListSuppliersShort=List of suppliers
ListProspectsShort=List of prospects
ListCustomersShort=List of customers
@ -429,7 +429,7 @@ ActivityStateFilter=Activity status
ProductsIntoElements=List of products/services into %s
CurrentOutstandingBill=Current outstanding bill
OutstandingBill=Max. for outstanding bill
OutstandingBillReached=Reached max. for outstanding bill
OutstandingBillReached=Max. for outstanding bill reached
MonkeyNumRefModelDesc=Return numero with format %syymm-nnnn for customer code and %syymm-nnnn for supplier code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0.
LeopardNumRefModelDesc=The code is free. This code can be modified at any time.
ManagingDirectors=Manager(s) name (CEO, director, president...)
@ -440,7 +440,7 @@ MergeThirdparties=Merge third parties
ConfirmMergeThirdparties=Are you sure you want to merge this third party into the current one ? All linked objects (invoices, orders, ...) will be moved to current third party so you will be able to delete the duplicate one.
ThirdpartiesMergeSuccess=Thirdparties have been merged
ErrorThirdpartiesMerge=There was an error when deleting the thirdparties. Please check the log. Changes have been reverted.
SaleRepresentativeLogin=Login of sale representative
SaleRepresentativeLogin=Login of sales representative
SaleRepresentativeFirstname=Firstname of sales representative
SaleRepresentativeLastname=Lastname of sales representative
ModelModulesContact=Document Models of contact

View File

@ -40,8 +40,8 @@ CronNone=None
CronDtStart=Not before
CronDtEnd=Not after
CronDtNextLaunch=Next execution
CronDtLastLaunch=Start date of last execution
CronDtLastResult=End date of last execution
CronDtLastLaunch=Start date of latest execution
CronDtLastResult=End date of latest execution
CronFrequency=Frequency
CronClass=Class
CronMethod=Method

View File

@ -73,7 +73,7 @@ FileNotUploaded=The file was not uploaded
FileUploaded=The file was successfully uploaded
FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. Click on "Attach file" for this.
NbOfEntries=Nb of entries
GoToWikiHelpPage=Read online help (need Internet access)
GoToWikiHelpPage=Read online help (Internet access needed)
GoToHelpPage=Read help
RecordSaved=Record saved
RecordDeleted=Record deleted
@ -94,12 +94,12 @@ ConnectedSince=Connected since
AuthenticationMode=Authentification mode
RequestedUrl=Requested Url
DatabaseTypeManager=Database type manager
RequestLastAccess=Request for last database access
RequestLastAccessInError=Request for last database access in error
ReturnCodeLastAccessInError=Return code for last database access in error
InformationLastAccessInError=Information for last database access in error
RequestLastAccess=Latest database access request
RequestLastAccessInError=Latest database access request error
ReturnCodeLastAccessInError=Return code for latest database access request error
InformationLastAccessInError=Information for latest database access request error
DolibarrHasDetectedError=Dolibarr has detected a technical error
InformationToHelpDiagnose=This is information that can help diagnostic
InformationToHelpDiagnose=This information can be useful for diagnostic
MoreInformation=More information
TechnicalInformation=Technical information
TechnicalID=Technical ID
@ -142,7 +142,7 @@ Update=Update
AddActionToDo=Add event to do
AddActionDone=Add event done
Close=Close
CloseBox=Remove box of your dashboard
CloseBox=Remove box from your dashboard
Confirm=Confirm
ConfirmSendCardByMail=Do you really want to send content of this card by mail to <b>%s</b> ?
Delete=Delete
@ -550,8 +550,8 @@ NbOfCustomers=Number of customers
NbOfLines=Number of lines
NbOfObjects=Number of objects
NbOfReferers=Number of referrers
NbOfObjectReferers=Number of refering objects
Referers=Refering objects
NbOfObjectReferers=Number of related items
Referers=Related items
TotalQuantity=Total quantity
DateFromTo=From %s to %s
DateFrom=From %s

View File

@ -0,0 +1,17 @@
# ADMIN
RecordSaved=Currency rate added
RecordDeleted=Currency rate deleted
ErrorAddRateFail=Error in added rate
ErrorAddCurrencyFail=Error in added currency
ErrorDeleteCurrencyFail=Error delete fail
multicurrency_syncronize_error=Error in synchronization
multicurrency_useOriginTx=Use the origin rate
CurrencyLayerAccount=CurrencyLayer API
CurrencyLayerAccount_help_to_synchronize=You sould create an account on their website to use this functionnality<br />Get your <b>API key</b><br />If you use a free account you can't change the <b>currency source</b> (USD by default)<br />But if your main currency isn't USD you can use the <b>alternate currency source</b> to force you main currency<br /><br />You are limited at 1000 synchronizations per month
multicurrency_appId=API key
multicurrency_appCurrencySource=Currency source
multicurrency_alternateCurrencySource= Alternate currency souce
CurrenciesUsed=Currencies used
CurrenciesUsed_help_to_add=Add the differents currencies and rates you need to use on you <b>proposals</b>, <b>orders</b>, etc.
Rate=Rate
rate=rate

View File

@ -3,12 +3,12 @@ SecurityCode=Security code
Calendar=Calendar
NumberingShort=N°
Tools=Tools
ToolsDesc=This area is dedicated to group miscellaneous tools not available into other menu entries.<br><br>Those tools can be reached from menu on the side.
ToolsDesc=All miscellaneous tools not included in other menu entries are collected here.<br /><br />All the tools can be reached in the left menu.
Birthday=Birthday
BirthdayDate=Birthday
BirthdayDate=Birthday date
DateToBirth=Date of birth
BirthdayAlertOn= birthday alert active
BirthdayAlertOff= birthday alert inactive
BirthdayAlertOn=birthday alert active
BirthdayAlertOff=birthday alert inactive
Notify_FICHINTER_ADD_CONTACT=Added contact to Intervention
Notify_FICHINTER_VALIDATE=Intervention validated
Notify_FICHINTER_SENTBYMAIL=Intervention sent by mail
@ -69,8 +69,8 @@ PredefinedMailContentSendSupplierInvoice=__CONTACTCIVNAME__\n\nYou will find her
PredefinedMailContentSendShipping=__CONTACTCIVNAME__\n\nYou will find here the shipping __SHIPPINGREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
PredefinedMailContentSendFichInter=__CONTACTCIVNAME__\n\nYou will find here the intervention __FICHINTERREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
PredefinedMailContentThirdparty=__CONTACTCIVNAME__\n\n__PERSONALIZED__\n\n__SIGNATURE__
DemoDesc=Dolibarr is a compact ERP/CRM composed by several functional modules. A demo that includes all modules does not mean anything as this never occurs. So, several demo profiles are available.
ChooseYourDemoProfil=Choose the demo profile that match your activity...
DemoDesc=Dolibarr is a compact ERP/CRM supporting several functional modules. A demo showcasing all modules makes no sense as this scenario never occurs. So, several demo profiles are available.
ChooseYourDemoProfil=Choose the demo profile that best suits your needs...
DemoFundation=Manage members of a foundation
DemoFundation2=Manage members and bank account of a foundation
DemoCompanyServiceOnly=Manage a freelance activity selling service only
@ -84,22 +84,22 @@ ValidatedBy=Validated by %s
CanceledBy=Canceled by %s
ClosedBy=Closed by %s
CreatedById=User id who created
ModifiedById=User id who made last change
ModifiedById=User id who made latest change
ValidatedById=User id who validated
CanceledById=User id who canceled
ClosedById=User id who closed
CreatedByLogin=User login who created
ModifiedByLogin=User login who made last change
ModifiedByLogin=User login who made latest change
ValidatedByLogin=User login who validated
CanceledByLogin=User login who canceled
ClosedByLogin=User login who closed
FileWasRemoved=File %s was removed
DirWasRemoved=Directory %s was removed
FeatureNotYetAvailableShort=Available in a next version
FeatureNotYetAvailable=Feature not yet available in this version
FeatureExperimental=Experimental feature. Not stable in this version
FeatureDevelopment=Development feature. Not stable in this version
FeaturesSupported=Features supported
FeatureNotYetAvailableShort=Available in a future version
FeatureNotYetAvailable=Feature not yet available in the current version
FeatureExperimental=Experimental feature. Not stable in the current version
FeatureDevelopment=Development feature. Not stable in the current version
FeaturesSupported=Supported features
Width=Width
Height=Height
Depth=Depth
@ -111,7 +111,7 @@ CalculatedWeight=Calculated weight
CalculatedVolume=Calculated volume
Weight=Weight
TotalWeight=Total weight
WeightUnitton=tonnes
WeightUnitton=tonne
WeightUnitkg=kg
WeightUnitg=g
WeightUnitmg=mg
@ -147,27 +147,27 @@ SizeUnitinch=inch
SizeUnitfoot=foot
SizeUnitpoint=point
BugTracker=Bug tracker
SendNewPasswordDesc=This form allows you to request a new password. It will be send to your email address.<br>Change will be effective only after clicking on confirmation link inside this email.<br>Check your email reader software.
SendNewPasswordDesc=This form allows you to request a new password. It will be sent to your email address.<br />Change will become effective once you click on the confirmation link in the email.<br />Check your inbox.
BackToLoginPage=Back to login page
AuthenticationDoesNotAllowSendNewPassword=Authentication mode is <b>%s</b>.<br>In this mode, Dolibarr can't know nor change your password.<br>Contact your system administrator if you want to change your password.
EnableGDLibraryDesc=Install or enable GD library with your PHP for use this option.
AuthenticationDoesNotAllowSendNewPassword=Authentication mode is <b>%s</b>.<br />In this mode, Dolibarr can't know nor change your password.<br />Contact your system administrator if you want to change your password.
EnableGDLibraryDesc=Install or enable GD library on your PHP installation to use this option.
EnablePhpAVModuleDesc=You need to install a module compatible with your anti-virus. (Clamav : php4-clamavlib ou php5-clamavlib)
ProfIdShortDesc=<b>Prof Id %s</b> is an information depending on third party country.<br>For example, for country <b>%s</b>, it's code <b>%s</b>.
ProfIdShortDesc=<b>Prof Id %s</b> is an information depending on third party country.<br>For example, for country <b>%s</b>, it's code <b>%s</b>.
DolibarrDemo=Dolibarr ERP/CRM demo
StatsByNumberOfUnits=Statistics in number of products/services units
StatsByNumberOfEntities=Statistics in number of referring entities
NumberOfProposals=Number of proposals on last 12 month
NumberOfCustomerOrders=Number of customer orders on last 12 month
NumberOfCustomerInvoices=Number of customer invoices on last 12 month
NumberOfSupplierProposals=Number of supplier proposals on last 12 month
NumberOfSupplierOrders=Number of supplier orders on last 12 month
NumberOfSupplierInvoices=Number of supplier invoices on last 12 month
NumberOfUnitsProposals=Number of units on proposals on last 12 month
NumberOfUnitsCustomerOrders=Number of units on customer orders on last 12 month
NumberOfUnitsCustomerInvoices=Number of units on customer invoices on last 12 month
NumberOfUnitsSupplierProposals=Number of units on supplier proposals on last 12 month
NumberOfUnitsSupplierOrders=Number of units on supplier orders on last 12 month
NumberOfUnitsSupplierInvoices=Number of units on supplier invoices on last 12 month
NumberOfProposals=Number of proposals in past 12 months
NumberOfCustomerOrders=Number of customer orders in past 12 months
NumberOfCustomerInvoices=Number of customer invoices in past 12 months
NumberOfSupplierProposals=Number of supplier proposals in past 12 months
NumberOfSupplierOrders=Number of supplier orders in past 12 months
NumberOfSupplierInvoices=Number of supplier invoices in past 12 months
NumberOfUnitsProposals=Number of units on proposals in past 12 months
NumberOfUnitsCustomerOrders=Number of units on customer orders in past 12 months
NumberOfUnitsCustomerInvoices=Number of units on customer invoices in past 12 months
NumberOfUnitsSupplierProposals=Number of units on supplier proposals in past 12 months
NumberOfUnitsSupplierOrders=Number of units on supplier orders in past 12 months
NumberOfUnitsSupplierInvoices=Number of units on supplier invoices in past 12 months
EMailTextInterventionAddedContact=A newintervention %s has been assigned to you.
EMailTextInterventionValidated=The intervention %s has been validated.
EMailTextInvoiceValidated=The invoice %s has been validated.

View File

@ -8,7 +8,7 @@ Projects=Projects
ProjectsArea=Projects Area
ProjectStatus=Project status
SharedProject=Everybody
PrivateProject=Contacts of project
PrivateProject=Project contacts
MyProjectsDesc=This view is limited to projects you are a contact for (whatever is the type).
ProjectsPublicDesc=This view presents all projects you are allowed to read.
ProjectsPublicTaskDesc=This view presents all projects and tasks you are allowed to read.
@ -159,14 +159,14 @@ DocumentModelBaleine=Project report template for tasks
PlannedWorkload=Planned workload
PlannedWorkloadShort=Workload
WorkloadOccupation=Workload assignation
ProjectReferers=Refering objects
ProjectReferers=Related items
SearchAProject=Search a project
SearchATask=Search a task
ProjectMustBeValidatedFirst=Project must be validated first
ProjectDraft=Draft projects
FirstAddRessourceToAllocateTime=Associate a resource to allocate time
InputPerDay=Input per day
InputPerWeek=Input per week
InputPerDay=Input per day
InputPerWeek=Input per week
InputPerAction=Input per action
TimeAlreadyRecorded=Time spent already recorded for this task/day and user %s
ProjectsWithThisUserAsContact=Projects with this user as contact

View File

@ -107,12 +107,19 @@ class MultiCurrency extends CommonObject
*/
public function create(User $user, $trigger = true)
{
global $conf;
global $conf,$langs;
dol_syslog('Currency::create', LOG_DEBUG);
$error = 0;
if (self::checkCodeAlreadyExists($this->code))
{
$error++;
$this->errors[] = $langs->trans('multicurrency_code_already_added');
return -1;
}
if (empty($this->entity) || $this->entity <= 0) $this->entity = $conf->entity;
$now=date('Y-m-d H:i:s');
@ -505,9 +512,10 @@ class MultiCurrency extends CommonObject
{
$sql = 'SELECT m.rowid, mc.rate FROM '.MAIN_DB_PREFIX.'multicurrency m';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'multicurrency_rate mc ON (m.rowid = mc.fk_multicurrency)';
// FIXME Is this comptible with SQL ?
$sql.= ' WHERE m.code = "'.$db->escape($code).'" AND mc.date_sync >= ALL (SELECT date_sync FROM '.MAIN_DB_PREFIX.'multicurrency_rate)';
$sql.= " AND m.entity IN '".getEntity('multicurrency', 1)."'";
$sql.= ' WHERE m.code = "'.$db->escape($code).'"';
$sql.= " AND m.entity IN (".getEntity('multicurrency', 1).")";
$sql.= ' ORDER BY mc.date_sync DESC LIMIT 1';
$resql = $db->query($sql);
if ($resql && $obj = $db->fetch_object($resql)) return array($obj->rowid, $obj->rate);
else return array(0, 1);
@ -616,6 +624,21 @@ class MultiCurrency extends CommonObject
}
}
}
/**
* Check in database if the current code already exists
*
* @param string $code current code to search
* @return true if exists, false if not exists
*/
public static function checkCodeAlreadyExists($code)
{
global $db;
$currency = new MultiCurrency($db);
if ($currency->fetch('', $code) > 0) return true;
else return false;
}
}
/**