diff --git a/README.md b/README.md
index ad1702fffe4..a59e3e8d8f3 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@ You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL)
git clone https://github.com/dolibarr/dolibarr -b x.y (where x.y is main version like 3.6, 9.0, ...)
-- Set up your web server to use "*dolibarr/htdocs*" as root if you'r web server does not have directory to point to already defined.
+- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
- Create an empty `htdocs/conf/conf.php` file and set *write* permissions for your web server user (*write* permission will be removed once install is finished)
diff --git a/dev/resources/iso-normes/Accountancy-format_Ebp_txt.pdf b/dev/resources/iso-normes/Accountancy-format_Ebp_txt.pdf
new file mode 100644
index 00000000000..24e6fca05e9
Binary files /dev/null and b/dev/resources/iso-normes/Accountancy-format_Ebp_txt.pdf differ
diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php
index 01f02a8a80a..90b722d7959 100644
--- a/htdocs/accountancy/class/accountancyexport.class.php
+++ b/htdocs/accountancy/class/accountancyexport.class.php
@@ -42,7 +42,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php';
class AccountancyExport
{
/**
- * @var Type of export. Defined by $conf->global->ACCOUNTING_EXPORT_MODELCSV
+ * Type of export. Defined by $conf->global->ACCOUNTING_EXPORT_MODELCSV
*/
public static $EXPORT_TYPE_NORMAL = 1; // CSV
public static $EXPORT_TYPE_CONFIGURABLE = 10; // CSV
@@ -535,14 +535,18 @@ class AccountancyExport
print $line->id . $separator;
print $date . $separator;
print $line->code_journal . $separator;
- print length_accountg($line->numero_compte) . $separator;
- print substr(length_accountg($line->numero_compte), 0, 2) . $separator;
+ if (empty($line->subledger_account)) {
+ print $line->numero_compte . $separator;
+ } else {
+ print $line->subledger_account . $separator;
+ }
+ //print substr(length_accountg($line->numero_compte), 0, 2) . $separator;
print '"'.dol_trunc($line->label_operation, 40, 'right', 'UTF-8', 1).'"' . $separator;
print '"'.dol_trunc($line->piece_num, 15, 'right', 'UTF-8', 1).'"'.$separator;
print price2num($line->montant).$separator;
print $line->sens.$separator;
print $date . $separator;
- print 'EUR';
+ //print 'EUR';
print $end_line;
}
}
diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php
index 9fc256540a2..2a0a66fe269 100644
--- a/htdocs/admin/bank.php
+++ b/htdocs/admin/bank.php
@@ -50,8 +50,8 @@ $type = 'bankaccount';
//Order display of bank account
if ($action == 'setbankorder') {
- if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION",
- GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity) > 0) {
+ if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity) > 0)
+ {
header("Location: " . $_SERVER["PHP_SELF"]);
exit;
}
@@ -62,8 +62,8 @@ if ($action == 'setbankorder') {
//Auto report last num releve on conciliate
if ($action == 'setreportlastnumreleve') {
- if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 1, 'chaine', 0,
- '', $conf->entity) > 0) {
+ if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 1, 'chaine', 0, '', $conf->entity) > 0)
+ {
header("Location: " . $_SERVER["PHP_SELF"]);
exit;
}
@@ -72,8 +72,8 @@ if ($action == 'setreportlastnumreleve') {
}
}
elseif ($action == 'unsetreportlastnumreleve') {
- if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 0, 'chaine', 0,
- '', $conf->entity) > 0) {
+ if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 0, 'chaine', 0, '', $conf->entity) > 0)
+ {
header("Location: " . $_SERVER["PHP_SELF"]);
exit;
}
@@ -100,8 +100,7 @@ if ($action == 'specimen') {
$filefound = 0;
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
foreach ($dirmodels as $reldir) {
- $file = dol_buildpath($reldir . "core/modules/bank/doc/pdf_" . $modele . ".modules.php",
- 0);
+ $file = dol_buildpath($reldir . "core/modules/bank/doc/pdf_" . $modele . ".modules.php", 0);
if (file_exists($file)) {
$filefound = 1;
$classname = "pdf_" . $modele;
@@ -142,8 +141,7 @@ elseif ($action == 'del') {
}
// Set default model
elseif ($action == 'setdoc') {
- if (dolibarr_set_const($db, "BANKADDON_PDF", $value, 'chaine', 0, '',
- $conf->entity)) {
+ if (dolibarr_set_const($db, "BANKADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
// The constant that was read before the new set
// We therefore requires a variable to have a coherent view
$conf->global->BANKADDON_PDF = $value;
@@ -169,8 +167,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
llxHeader("", $langs->trans("BankSetupModule"));
$linkback = '' . $langs->trans("BackToModuleList") . ' ';
-print load_fiche_titre($langs->trans("BankSetupModule"), $linkback,
- 'title_setup');
+print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, 'title_setup');
$head = bank_admin_prepare_head(null);
dol_fiche_head($head, 'general', $langs->trans("BankSetupModule"), -1, 'account');
@@ -252,7 +249,7 @@ if ($resql) {
while ($i < $num_rows) {
$array = $db->fetch_array($resql);
array_push($def, $array[0]);
- $i ++;
+ $i++;
}
}
else {
@@ -285,8 +282,7 @@ foreach ($dirmodels as $reldir) {
arsort($filelist);
foreach ($filelist as $file) {
- if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/',
- $file)) {
+ if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
if (file_exists($dir . '/' . $file)) {
$name = substr($file, 4, dol_strlen($file) - 16);
@@ -296,11 +292,9 @@ foreach ($dirmodels as $reldir) {
$module = new $classname($db);
$modulequalified = 1;
- if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL
- < 2)
+ if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2)
$modulequalified = 0;
- if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL
- < 1)
+ if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1)
$modulequalified = 0;
if ($modulequalified) {
@@ -317,27 +311,23 @@ foreach ($dirmodels as $reldir) {
if (in_array($name, $def)) {
print '
' . "\n";
print '';
- print img_picto($langs->trans("Enabled"),
- 'switch_on');
+ print img_picto($langs->trans("Enabled"), 'switch_on');
print ' ';
print ' ';
}
else {
print '' . "\n";
- print 'scandir . '&label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"),
- 'switch_off') . ' ';
+ print 'scandir . '&label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . ' ';
print " ";
}
// Default
print '';
if ($conf->global->BANKADDON_PDF == $name) {
- print img_picto($langs->trans("Default"),
- 'on');
+ print img_picto($langs->trans("Default"), 'on');
}
else {
- print 'scandir . '&label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"),
- 'off') . ' ';
+ print 'scandir . '&label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'off') . ' ';
}
print ' ';
@@ -348,30 +338,25 @@ foreach ($dirmodels as $reldir) {
$htmltooltip .= ' ' . $langs->trans("Width") . '/' . $langs->trans("Height") . ': ' . $module->page_largeur . '/' . $module->page_hauteur;
}
$htmltooltip .= '' . $langs->trans("FeaturesSupported") . ': ';
- $htmltooltip .= ' ' . $langs->trans("Logo") . ': ' . yn($module->option_logo,
- 1, 1);
+ $htmltooltip .= ' ' . $langs->trans("Logo") . ': ' . yn($module->option_logo, 1, 1);
//$htmltooltip .= ' ' . $langs->trans("PaymentMode") . ': ' . yn($module->option_modereg, 1, 1);
//$htmltooltip .= ' ' . $langs->trans("PaymentConditions") . ': ' . yn($module->option_condreg, 1, 1);
- $htmltooltip .= ' ' . $langs->trans("MultiLanguage") . ': ' . yn($module->option_multilang,
- 1, 1);
+ $htmltooltip .= ' ' . $langs->trans("MultiLanguage") . ': ' . yn($module->option_multilang, 1, 1);
// $htmltooltip.=' '.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
// $htmltooltip.=' '.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
//$htmltooltip .= ' ' . $langs->trans("WatermarkOnDraftOrders") . ': ' . yn($module->option_draft_watermark, 1, 1);
print '';
- print $form->textwithpicto('', $htmltooltip, 1,
- 0);
+ print $form->textwithpicto('', $htmltooltip, 1, 0);
print ' ';
// Preview
print '';
if ($module->type == 'pdf') {
- print '' . img_object($langs->trans("Preview"),
- 'bill') . ' ';
+ print '' . img_object($langs->trans("Preview"), 'bill') . ' ';
}
else {
- print img_object($langs->trans("PreviewNotAvailable"),
- 'generic');
+ print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print ' ';
@@ -423,8 +408,7 @@ if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) {
else
{
print '' . "\n";
- print '' . img_picto($langs->trans("Disabled"),
- 'switch_off') . ' ';
+ print '' . img_picto($langs->trans("Disabled"), 'switch_off') . ' ';
print " ";
}
diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php
index de4959354db..fd74938d802 100644
--- a/htdocs/admin/emailcollector_card.php
+++ b/htdocs/admin/emailcollector_card.php
@@ -307,7 +307,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($action == 'clone') {
// Create an array for form
$formquestion = array();
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneMyObject'), $langs->trans('ConfirmCloneMyObject', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneEmailCollector', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
// Confirmation of action process
diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php
index 3312b44aba2..e1d65250b6d 100644
--- a/htdocs/admin/facture.php
+++ b/htdocs/admin/facture.php
@@ -78,7 +78,7 @@ if ($action == 'updateMask')
}
}
-if ($action == 'specimen')
+else if ($action == 'specimen')
{
$modele=GETPOST('module', 'alpha');
@@ -164,7 +164,7 @@ elseif ($action == 'setmod')
dolibarr_set_const($db, "FACTURE_ADDON", $value, 'chaine', 0, '', $conf->entity);
}
-if ($action == 'setribchq')
+else if ($action == 'setribchq')
{
$rib = GETPOST('rib', 'alpha');
$chq = GETPOST('chq', 'alpha');
@@ -184,7 +184,7 @@ if ($action == 'setribchq')
}
}
-if ($action == 'set_FACTURE_DRAFT_WATERMARK')
+else if ($action == 'set_FACTURE_DRAFT_WATERMARK')
{
$draft = GETPOST('FACTURE_DRAFT_WATERMARK', 'alpha');
@@ -202,7 +202,7 @@ if ($action == 'set_FACTURE_DRAFT_WATERMARK')
}
}
-if ($action == 'set_INVOICE_FREE_TEXT')
+else if ($action == 'set_INVOICE_FREE_TEXT')
{
$freetext = GETPOST('INVOICE_FREE_TEXT', 'none'); // No alpha here, we want exact string
@@ -220,7 +220,7 @@ if ($action == 'set_INVOICE_FREE_TEXT')
}
}
-if ($action == 'setforcedate')
+else if ($action == 'setforcedate')
{
$forcedate = GETPOST('forcedate', 'alpha');
@@ -238,7 +238,7 @@ if ($action == 'setforcedate')
}
}
-if ($action == 'setDefaultPDFModulesByType')
+else if ($action == 'setDefaultPDFModulesByType')
{
$invoicetypemodels = GETPOST('invoicetypemodels');
diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php
index f18b09b7d05..4c3c306cc59 100644
--- a/htdocs/admin/menus.php
+++ b/htdocs/admin/menus.php
@@ -155,7 +155,7 @@ print ' ';
dol_fiche_head($head, 'handler', $langs->trans("Menus"), -1);
-print $langs->trans("MenusDesc")." \n";
+print ''.$langs->trans("MenusDesc")." \n";
print " \n";
diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php
index 7fda7fca2ec..5283d9a3aca 100644
--- a/htdocs/admin/menus/index.php
+++ b/htdocs/admin/menus/index.php
@@ -237,7 +237,7 @@ $h++;
dol_fiche_head($head, 'editor', $langs->trans("Menus"), -1);
-print $langs->trans("MenusEditorDesc")." \n";
+print ''.$langs->trans("MenusEditorDesc")." \n";
print " \n";
diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php
index 9442d449974..e9a037b98c9 100644
--- a/htdocs/admin/propal.php
+++ b/htdocs/admin/propal.php
@@ -70,7 +70,7 @@ if ($action == 'updateMask')
}
}
-if ($action == 'specimen')
+else if ($action == 'specimen')
{
$modele=GETPOST('module', 'alpha');
@@ -115,7 +115,27 @@ if ($action == 'specimen')
}
}
-if ($action == 'set_PROPALE_DRAFT_WATERMARK')
+else if ($action == 'setribchq')
+{
+ $rib = GETPOST('rib','alpha');
+ $chq = GETPOST('chq','alpha');
+
+ $res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER",$rib,'chaine',0,'',$conf->entity);
+ $res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER",$chq,'chaine',0,'',$conf->entity);
+
+ if (! $res > 0) $error++;
+
+ if (! $error)
+ {
+ setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
+ }
+ else
+ {
+ setEventMessages($langs->trans("Error"), null, 'errors');
+ }
+}
+
+else if ($action == 'set_PROPALE_DRAFT_WATERMARK')
{
$draft = GETPOST('PROPALE_DRAFT_WATERMARK', 'alpha');
@@ -132,7 +152,7 @@ if ($action == 'set_PROPALE_DRAFT_WATERMARK')
}
}
-if ($action == 'set_PROPOSAL_FREE_TEXT')
+else if ($action == 'set_PROPOSAL_FREE_TEXT')
{
$freetext = GETPOST('PROPOSAL_FREE_TEXT', 'none'); // No alpha here, we want exact string
@@ -150,7 +170,7 @@ if ($action == 'set_PROPOSAL_FREE_TEXT')
}
}
-if ($action == 'setdefaultduration')
+else if ($action == 'setdefaultduration')
{
$res = dolibarr_set_const($db, "PROPALE_VALIDITY_DURATION", $value, 'chaine', 0, '', $conf->entity);
@@ -166,7 +186,7 @@ if ($action == 'setdefaultduration')
}
}
-if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
+else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
{
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL", $value, 'chaine', 0, '', $conf->entity);
@@ -183,7 +203,7 @@ if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
}
// Activate a model
-if ($action == 'set')
+else if ($action == 'set')
{
$ret = addDocumentModel($value, $type, $label, $scandir);
}
@@ -499,6 +519,106 @@ foreach ($dirmodels as $reldir)
}
print '';
+
+/*
+ * Payment mode
+ */
+if (empty($conf->facture->enabled))
+{
+ print ' ';
+ print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInProposal"),'','');
+
+ print '";
+}
+
print ' ';
diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php
index 19d7fdaa60b..25bcb8a1b15 100644
--- a/htdocs/bom/bom_card.php
+++ b/htdocs/bom/bom_card.php
@@ -27,7 +27,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
-require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom_bom.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("mrp","other"));
@@ -72,8 +72,6 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
/*
* Actions
- *
- * Put here all code to do according to value of "action" parameter
*/
$parameters=array();
@@ -91,20 +89,20 @@ if (empty($reshook))
if (empty($id)) $backtopage = $backurlforlist;
else $backtopage = DOL_URL_ROOT.'/bom/bom_card.php?id='.$id;
}
- $triggermodname = 'BILLOFMATERIALS_BILLOFMATERIALS_MODIFY'; // Name of trigger action code to execute when we modify record
+ $triggermodname = 'BOM_MODIFY'; // Name of trigger action code to execute when we modify record
// Actions cancel, add, update, delete or clone
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
// Actions when linking object each other
- include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
+ include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
// Actions when printing a doc from card
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
// Actions to send emails
- $trigger_name='BILLOFMATERIALS_SENTBYMAIL';
- $autocopy='MAIN_MAIL_AUTOCOPY_BILLOFMATERIALS_TO';
+ $trigger_name='BOM_SENTBYMAIL';
+ $autocopy='MAIN_MAIL_AUTOCOPY_BOM_TO';
$trackid='bom'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
}
@@ -210,7 +208,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$res = $object->fetch_optionals();
$head = bomPrepareHead($object);
- dol_fiche_head($head, 'card', $langs->trans("NewBOM"), -1, 'bom');
+ dol_fiche_head($head, 'card', $langs->trans("BillOfMaterials"), -1, 'bom');
$formconfirm = '';
@@ -224,7 +222,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($action == 'clone') {
// Create an array for form
$formquestion = array();
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneBillOfMaterials'), $langs->trans('ConfirmCloneBillOfMaterials', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneBillOfMaterials', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
// Confirmation of action xxxx
diff --git a/htdocs/bom/bom_document.php b/htdocs/bom/bom_document.php
index ff8887bb4e8..197b9779988 100644
--- a/htdocs/bom/bom_document.php
+++ b/htdocs/bom/bom_document.php
@@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
-require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom_bom.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("mrp","companies","other","mails"));
@@ -58,7 +58,7 @@ if (! $sortfield) $sortfield="name";
//if (! $sortfield) $sortfield="position_name";
// Initialize technical objects
-$object=new BillOfMaterials($db);
+$object=new BOM($db);
$extrafields = new ExtraFields($db);
$diroutputmassaction=$conf->bom->dir_output . '/temp/massgeneration/'.$user->id;
$hookmanager->initHooks(array('bomdocument', 'globalcard')); // Note that conf->hooks_modules contains array
diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php
index cf9ad7ffaf2..b0ffd62155c 100644
--- a/htdocs/bom/bom_list.php
+++ b/htdocs/bom/bom_list.php
@@ -332,7 +332,7 @@ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sort
// Add code for pre mass action (confirmation or email presend form)
$topicmail="SendBillOfMaterialsRef";
$modelmail="bom";
-$objecttmp=new BillOfMaterials($db);
+$objecttmp=new BOM($db);
$trackid='xxxx'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
@@ -375,6 +375,7 @@ foreach($object->fields as $key => $val)
$cssforfield='';
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
+ if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
if (! empty($arrayfields['t.'.$key]['checked'])) print ' ';
}
@@ -401,6 +402,7 @@ foreach($object->fields as $key => $val)
$cssforfield='';
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
+ if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
if (! empty($arrayfields['t.'.$key]['checked']))
{
@@ -452,9 +454,9 @@ while ($i < min($num, $limit))
$cssforfield='';
if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
-
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap';
+ if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
if (! empty($arrayfields['t.'.$key]['checked']))
{
@@ -465,7 +467,9 @@ while ($i < min($num, $limit))
print $val['css'];
if ($cssforfield || $val['css']) print '"';
print '>';
- print $object->showOutputField($val, $key, $obj->$key, '');
+ if ($key == 'status') print $object->getLibStatut(5);
+ elseif (in_array($val['type'], array('date','datetime','timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), '');
+ else print $object->showOutputField($val, $key, $obj->$key, '');
print '';
if (! $i) $totalarray['nbfield']++;
if (! empty($val['isameasure']))
diff --git a/htdocs/bom/bom_note.php b/htdocs/bom/bom_note.php
index 4c45512c064..75232a74d42 100644
--- a/htdocs/bom/bom_note.php
+++ b/htdocs/bom/bom_note.php
@@ -25,7 +25,7 @@
// Load Dolibarr environment
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
-require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom_bom.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("mrp","companies"));
@@ -38,7 +38,7 @@ $cancel = GETPOST('cancel', 'aZ09');
$backtopage = GETPOST('backtopage', 'alpha');
// Initialize technical objects
-$object=new BillOfMaterials($db);
+$object=new BOM($db);
$extrafields = new ExtraFields($db);
$diroutputmassaction=$conf->bom->dir_output . '/temp/massgeneration/'.$user->id;
$hookmanager->initHooks(array('bomnote','globalcard')); // Note that conf->hooks_modules contains array
diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php
index 606693bbed6..47aae86db04 100644
--- a/htdocs/bom/class/bom.class.php
+++ b/htdocs/bom/class/bom.class.php
@@ -60,11 +60,16 @@ class BOM extends CommonObject
public $table_element_line = 'bom_bomline';
+ const STATUS_DRAFT = 0;
+ const STATUS_VALIDATED = 1;
+ const STATUS_DISABLED = -1;
+
+
/**
* 'type' if the field format.
* 'label' the translation key.
* 'enabled' is a condition when the field must be managed.
- * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only. Using a negative value means field is not shown by default on list but can be selected for viewing)
+ * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). Using a negative value means field is not shown by default on list but can be selected for viewing)
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'default' is a default value for creation (can still be replaced by the global setup of default values)
* 'index' if we want an index in database.
@@ -85,18 +90,20 @@ class BOM extends CommonObject
*/
public $fields=array(
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",),
- 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of BOM", 'showoncombobox'=>'1',),
+ 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>4, 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of BOM", 'showoncombobox'=>'1',),
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'notnull'=>1, 'searchall'=>1, 'showoncombobox'=>'1',),
'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>60, 'notnull'=>-1,),
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>-1, 'position'=>61, 'notnull'=>-1,),
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>-1, 'position'=>62, 'notnull'=>-1,),
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500, 'notnull'=>1,),
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>1,),
- 'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'llx_user.rowid',),
+ 'date_valid' => array('type'=>'datetime', 'label'=>'DateValid', 'enabled'=>1, 'visible'=>-2, 'position'=>502, 'notnull'=>0,),
+ 'fk_user_creat' => array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'llx_user.rowid',),
'fk_user_modif' => array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'position'=>511, 'notnull'=>-1,),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000, 'notnull'=>-1,),
+ 'fk_user_valid' => array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>512, 'notnull'=>0,),
+ 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000, 'notnull'=>-1,),
'fk_product' => array('type'=>'integer:Product:product/class/product.class.php', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>50, 'notnull'=>1, 'index'=>1, 'help'=>'ProductBOMHelp'),
- 'qty' => array('type'=>'double(24,8)', 'label'=>'Quantity', 'enabled'=>1, 'visible'=>1, 'default'=>1, 'position'=>55, 'notnull'=>1, 'isameasure'=>'1',),
+ 'qty' => array('type'=>'real', 'label'=>'Quantity', 'enabled'=>1, 'visible'=>1, 'default'=>1, 'position'=>55, 'notnull'=>1, 'isameasure'=>'1',),
'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>2, 'position'=>1000, 'notnull'=>1, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Enabled', '-1'=>'Disabled')),
);
public $rowid;
@@ -116,7 +123,6 @@ class BOM extends CommonObject
// END MODULEBUILDER PROPERTIES
-
// If this object has a subtable with lines
/**
@@ -278,14 +284,14 @@ class BOM extends CommonObject
*
* @return int <0 if KO, 0 if not found, >0 if OK
*/
- /*public function fetchLines()
+ public function fetchLines()
{
$this->lines=array();
- // Load lines with object BillOfMaterialsLine
+ // Load lines with object BOMLine
return count($this->lines)?1:0;
- }*/
+ }
/**
* Load list of objects in memory from the database.
@@ -390,6 +396,189 @@ class BOM extends CommonObject
//return $this->deleteCommon($user, $notrigger, 1);
}
+
+ /**
+ * Validate bom
+ *
+ * @param User $user User making status change
+ * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
+ * @return int <=0 if OK, 0=Nothing done, >0 if KO
+ */
+ public function valid($user, $notrigger = 0)
+ {
+ global $conf, $langs;
+ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
+
+ $error=0;
+
+ // Protection
+ if ($this->statut == self::STATUS_VALIDATED)
+ {
+ dol_syslog(get_class($this)."::valid action abandonned: already validated", LOG_WARNING);
+ return 0;
+ }
+
+ /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->create))
+ || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate))))
+ {
+ $this->error='NotEnoughPermissions';
+ dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR);
+ return -1;
+ }*/
+
+ $now=dol_now();
+
+ $this->db->begin();
+
+ // Define new ref
+ if (! $error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life
+ {
+ $num = $this->getNextNumRef();
+ }
+ else
+ {
+ $num = $this->ref;
+ }
+ $this->newref = $num;
+
+ // Validate
+ $sql = "UPDATE ".MAIN_DB_PREFIX."bom_bom";
+ $sql.= " SET ref = '".$this->db->escape($num)."',";
+ $sql.= " status = ".self::STATUS_VALIDATED.",";
+ $sql.= " date_valid='".$this->db->idate($now)."',";
+ $sql.= " fk_user_valid = ".$user->id;
+ $sql.= " WHERE rowid = ".$this->id;
+
+ dol_syslog(get_class($this)."::valid()", LOG_DEBUG);
+ $resql=$this->db->query($sql);
+ if (! $resql)
+ {
+ dol_print_error($this->db);
+ $this->error=$this->db->lasterror();
+ $error++;
+ }
+
+ if (! $error && ! $notrigger)
+ {
+ // Call trigger
+ $result=$this->call_trigger('BOM_VALIDATE', $user);
+ if ($result < 0) $error++;
+ // End call triggers
+ }
+
+ if (! $error)
+ {
+ $this->oldref = $this->ref;
+
+ // Rename directory if dir was a temporary ref
+ if (preg_match('/^[\(]?PROV/i', $this->ref))
+ {
+ // On renomme repertoire ($this->ref = ancienne ref, $num = nouvelle ref)
+ // in order not to lose the attachments
+ $oldref = dol_sanitizeFileName($this->ref);
+ $newref = dol_sanitizeFileName($num);
+ $dirsource = $conf->bom->dir_output.'/'.$oldref;
+ $dirdest = $conf->bom->dir_output.'/'.$newref;
+ if (file_exists($dirsource))
+ {
+ dol_syslog(get_class($this)."::valid() rename dir ".$dirsource." into ".$dirdest);
+
+ if (@rename($dirsource, $dirdest))
+ {
+ dol_syslog("Rename ok");
+ // Rename docs starting with $oldref with $newref
+ $listoffiles=dol_dir_list($conf->bom->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/'));
+ foreach($listoffiles as $fileentry)
+ {
+ $dirsource=$fileentry['name'];
+ $dirdest=preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource);
+ $dirsource=$fileentry['path'].'/'.$dirsource;
+ $dirdest=$fileentry['path'].'/'.$dirdest;
+ @rename($dirsource, $dirdest);
+ }
+ }
+ }
+ }
+ }
+
+ // Set new ref and current status
+ if (! $error)
+ {
+ $this->ref = $num;
+ $this->status = self::STATUS_VALIDATED;
+ }
+
+ if (! $error)
+ {
+ $this->db->commit();
+ return 1;
+ }
+ else
+ {
+ $this->db->rollback();
+ return -1;
+ }
+ }
+
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ /**
+ * Set draft status
+ *
+ * @param User $user Object user that modify
+ * @return int <0 if KO, >0 if OK
+ */
+ public function setDraft($user)
+ {
+ //phpcs:enable
+ global $conf,$langs;
+
+ $error=0;
+
+ // Protection
+ if ($this->status <= self::STATUS_DRAFT)
+ {
+ return 0;
+ }
+
+ /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->write))
+ || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate))))
+ {
+ $this->error='Permission denied';
+ return -1;
+ }*/
+
+ $this->db->begin();
+
+ $sql = "UPDATE ".MAIN_DB_PREFIX."bom";
+ $sql.= " SET status = ".self::STATUS_DRAFT;
+ $sql.= " WHERE rowid = ".$this->id;
+
+ dol_syslog(get_class($this)."::setDraft", LOG_DEBUG);
+ if ($this->db->query($sql))
+ {
+ if (!$error) {
+ // Call trigger
+ $result=$this->call_trigger('BOM_UNVALIDATE', $user);
+ if ($result < 0) $error++;
+ }
+
+ if (!$error) {
+ $this->status=self::STATUS_DRAFT;
+ $this->db->commit();
+ return 1;
+ }else {
+ $this->db->rollback();
+ return -1;
+ }
+ }
+ else
+ {
+ $this->error=$this->db->error();
+ $this->db->rollback();
+ return -1;
+ }
+ }
+
/**
* Return a link to the object card (with optionaly the picto)
*
@@ -628,9 +817,9 @@ class BOM extends CommonObject
/**
- * Class for BillOfMaterialsLine
+ * Class for BOMLine
*/
-class BillOfMaterialsLine extends CommonObject
+class BOMLine extends CommonObject
{
/**
* @var string ID to identify managed object
@@ -853,24 +1042,10 @@ class BillOfMaterialsLine extends CommonObject
public function fetch($id, $ref = null)
{
$result = $this->fetchCommon($id, $ref);
- if ($result > 0 && ! empty($this->table_element_line)) $this->fetchLines();
+ //if ($result > 0 && ! empty($this->table_element_line)) $this->fetchLines();
return $result;
}
- /**
- * Load object lines in memory from the database
- *
- * @return int <0 if KO, 0 if not found, >0 if OK
- */
- /*public function fetchLines()
- {
- $this->lines=array();
-
- // Load lines with object BillOfMaterialsLineLine
-
- return count($this->lines)?1:0;
- }*/
-
/**
* Load list of objects in memory from the database.
*
diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index 6ad881d141c..c6a4c3d225c 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -1391,7 +1391,7 @@ if ($id > 0)
// Clone event
if($action == 'clone')
{
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneEvent', $object->label), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('ToClone'), $langs->trans('ConfirmCloneEvent', $object->label), 'confirm_clone', $formquestion, 'yes', 1);
print $formconfirm;
}
diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php
index 8bf84f45cde..ded7d4fd238 100644
--- a/htdocs/comm/action/list.php
+++ b/htdocs/comm/action/list.php
@@ -691,11 +691,11 @@ if ($resql)
// Date creation
if (! empty($arrayfields['a.datec']['checked'])) {
// Status/Percent
- print ''.dol_print_date($obj->datec, 'dayhour').' ';
+ print ''.dol_print_date($db->jdate($obj->datec), 'dayhour').' ';
}
// Date update
if (! empty($arrayfields['a.tms']['checked'])) {
- print ''.dol_print_date($obj->datem, 'dayhour').' ';
+ print ''.dol_print_date($db->jdate($obj->datem), 'dayhour').' ';
}
if (! empty($arrayfields['a.percent']['checked'])) {
// Status/Percent
diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php
index 9e8fb3a9964..b710ba4656b 100644
--- a/htdocs/comm/mailing/card.php
+++ b/htdocs/comm/mailing/card.php
@@ -961,7 +961,7 @@ else
array('type' => 'checkbox', 'name' => 'clone_receivers', 'label' => $langs->trans("CloneReceivers"), 'value' => 0)
);
// Paiement incomplet. On demande si motif = escompte ou autre
- print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CloneEMailing'), $langs->trans('ConfirmCloneEMailing', $object->ref), 'confirm_clone', $formquestion, 'yes', 2, 240);
+ print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneEMailing', $object->ref), 'confirm_clone', $formquestion, 'yes', 2, 240);
}
/*
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 32b802a941e..44c05629744 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -1764,8 +1764,8 @@ if ($action == 'create')
$newclassname = 'Intervention';
print '' . $langs->trans($newclassname) . ' ' . $objectsrc->getNomUrl(1) . ' ';
- print '' . $langs->trans('TotalHT') . ' ' . price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . ' ';
- print '' . $langs->trans('TotalVAT') . ' ' . price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . " ";
+ print '' . $langs->trans('AmountHT') . ' ' . price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . ' ';
+ print '' . $langs->trans('AmountVAT') . ' ' . price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . " ";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0 ) // Localtax1
{
print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ' ' . price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . " ";
@@ -1775,7 +1775,14 @@ if ($action == 'create')
{
print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ' ' . price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . " ";
}
- print '' . $langs->trans('TotalTTC') . ' ' . price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . " ";
+ print '' . $langs->trans('AmountTTC') . ' ' . price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . " ";
+
+ if (!empty($conf->multicurrency->enabled))
+ {
+ print '' . $langs->trans('MulticurrencyAmountHT') . ' ' . price($objectsrc->multicurrency_total_ht) . ' ';
+ print '' . $langs->trans('MulticurrencyAmountVAT') . ' ' . price($objectsrc->multicurrency_total_tva) . " ";
+ print '' . $langs->trans('MulticurrencyAmountTTC') . ' ' . price($objectsrc->multicurrency_total_ttc) . " ";
+ }
}
print "\n";
@@ -1880,7 +1887,7 @@ if ($action == 'create')
$formquestion[] = array('type' => 'date','name' => 'date_delivery','label' => $langs->trans("DeliveryDate"),'value' => $object->date_livraison);
}
// Paiement incomplet. On demande si motif = escompte ou autre
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ClonePropal'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
if ($action == 'statut')
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 4df831f9793..65dba5049f4 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -1836,8 +1836,8 @@ if ($action == 'create' && $user->rights->commande->creer)
print '' . $langs->trans($newclassname) . ' ' . $objectsrc->getNomUrl(1) . ' ';
// Amount
- print '' . $langs->trans('TotalHT') . ' ' . price($objectsrc->total_ht) . ' ';
- print '' . $langs->trans('TotalVAT') . ' ' . price($objectsrc->total_tva) . " ";
+ print '' . $langs->trans('AmountHT') . ' ' . price($objectsrc->total_ht) . ' ';
+ print '' . $langs->trans('AmountVAT') . ' ' . price($objectsrc->total_tva) . " ";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE
{
print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ' ' . price($objectsrc->total_localtax1) . " ";
@@ -1848,13 +1848,13 @@ if ($action == 'create' && $user->rights->commande->creer)
print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ' ' . price($objectsrc->total_localtax2) . " ";
}
- print '' . $langs->trans('TotalTTC') . ' ' . price($objectsrc->total_ttc) . " ";
+ print '' . $langs->trans('AmountTTC') . ' ' . price($objectsrc->total_ttc) . " ";
if (!empty($conf->multicurrency->enabled))
{
- print '' . $langs->trans('MulticurrencyTotalHT') . ' ' . price($objectsrc->multicurrency_total_ht) . ' ';
- print '' . $langs->trans('MulticurrencyTotalVAT') . ' ' . price($objectsrc->multicurrency_total_tva) . " ";
- print '' . $langs->trans('MulticurrencyTotalTTC') . ' ' . price($objectsrc->multicurrency_total_ttc) . " ";
+ print '' . $langs->trans('MulticurrencyAmountHT') . ' ' . price($objectsrc->multicurrency_total_ht) . ' ';
+ print '' . $langs->trans('MulticurrencyAmountVAT') . ' ' . price($objectsrc->multicurrency_total_tva) . " ";
+ print '' . $langs->trans('MulticurrencyAmountTTC') . ' ' . price($objectsrc->multicurrency_total_ttc) . " ";
}
}
@@ -2047,7 +2047,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value'
// => 1),
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=3)')));
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
// Call Hook formConfirm
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 59fcb22d96d..e3fea0200dc 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -3245,8 +3245,8 @@ if ($action == 'create')
echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['facture'])->getNomUrl(1).')';
}
echo '';
- print '' . $langs->trans('TotalHT') . ' ' . price($objectsrc->total_ht) . ' ';
- print '' . $langs->trans('TotalVAT') . ' ' . price($objectsrc->total_tva) . " ";
+ print '' . $langs->trans('AmountHT') . ' ' . price($objectsrc->total_ht) . ' ';
+ print '' . $langs->trans('AmountVAT') . ' ' . price($objectsrc->total_tva) . " ";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1
{
print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ' ' . price($objectsrc->total_localtax1) . " ";
@@ -3256,7 +3256,7 @@ if ($action == 'create')
{
print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ' ' . price($objectsrc->total_localtax2) . " ";
}
- print '' . $langs->trans('TotalTTC') . ' ' . price($objectsrc->total_ttc) . " ";
+ print '' . $langs->trans('AmountTTC') . ' ' . price($objectsrc->total_ttc) . " ";
if (!empty($conf->multicurrency->enabled))
{
@@ -3608,7 +3608,7 @@ elseif ($id > 0 || ! empty($ref))
// array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company($object->socid, 'socid', '(s.client=1 OR s.client=2 OR s.client=3)', 1)));
// Paiement incomplet. On demande si motif = escompte ou autre
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
// Call Hook formConfirm
diff --git a/htdocs/compta/resultat/result.php b/htdocs/compta/resultat/result.php
index bd9f25bb0b8..59984ee444c 100644
--- a/htdocs/compta/resultat/result.php
+++ b/htdocs/compta/resultat/result.php
@@ -288,262 +288,251 @@ elseif ($modecompta=="BOOKKEEPING")
$j=1;
$sommes = array();
$totPerAccount = array();
-
- foreach ($cats as $cat) // Loop on each group
- {
- if (!empty($cat['category_type'])) // category calculed
+ if (!is_array($cats) && $cats<0) {
+ setEventMessages(null,$AccCat->errors,'errors');
+ } elseif (is_array($cats) && count($cats)>0) {
+ foreach ($cats as $cat) // Loop on each group
{
- // When we enter here, $sommes was filled by group of accounts
+ if (!empty($cat['category_type'])) // category calculed
+ {
+ // When we enter here, $sommes was filled by group of accounts
- $formula = $cat['formula'];
+ $formula = $cat['formula'];
- print '';
+ print ' ';
- // Year NP
- print '';
- print $cat['code'];
- print ' ';
- print $cat['label'];
- print ' ';
+ // Year NP
+ print '';
+ print $cat['code'];
+ print ' ';
+ print $cat['label'];
+ print ' ';
- $vars = array();
+ $vars = array();
- // Previous Fiscal year (N-1)
- foreach($sommes as $code => $det){
- $vars[$code] = $det['NP'];
- }
-
-
- $result = strtr($formula, $vars);
-
- //var_dump($result);
- //$r = $AccCat->calculate($result);
- $r = dol_eval($result, 1);
- //var_dump($r);
-
- print '' . price($r) . ' ';
-
- // Year N
- $code = $cat['code']; // code of categorie ('VTE', 'MAR', ...)
- $sommes[$code]['NP'] += $r;
-
- // Current fiscal year (N)
- if (is_array($sommes) && ! empty($sommes)){
- foreach($sommes as $code => $det){
- $vars[$code] = $det['N'];
+ // Previous Fiscal year (N-1)
+ foreach ($sommes as $code => $det) {
+ $vars[$code] = $det['NP'];
}
- }
- $result = strtr($formula, $vars);
- //$r = $AccCat->calculate($result);
- $r = dol_eval($result, 1);
+ $result = strtr($formula, $vars);
- print '' . price($r) . ' ';
- $sommes[$code]['N'] += $r;
+ //var_dump($result);
+ //$r = $AccCat->calculate($result);
+ $r = dol_eval($result, 1);
+ //var_dump($r);
- // Detail by month
- foreach($months as $k => $v)
- {
- if (($k+1) >= $date_startmonth)
- {
- foreach($sommes as $code => $det){
- $vars[$code] = $det['M'][$k];
- }
- $result = strtr($formula, $vars);
+ print '' . price($r) . ' ';
- //$r = $AccCat->calculate($result);
- $r = dol_eval($result, 1);
+ // Year N
+ $code = $cat['code']; // code of categorie ('VTE', 'MAR', ...)
+ $sommes[$code]['NP'] += $r;
- print '' . price($r) . ' ';
- $sommes[$code]['M'][$k] += $r;
- }
- }
- foreach($months as $k => $v)
- {
- if (($k+1) < $date_startmonth)
- {
- foreach($sommes as $code => $det){
- $vars[$code] = $det['M'][$k];
- }
- $result = strtr($formula, $vars);
-
- //$r = $AccCat->calculate($result);
- $r = dol_eval($result, 1);
-
- print '' . price($r) . ' ';
- $sommes[$code]['M'][$k] += $r;
- }
- }
-
- print " \n";
-
- //var_dump($sommes);
- }
- else // normal category
- {
- $code = $cat['code']; // Category code we process
-
- $totCat = array();
- $totCat['NP'] = 0;
- $totCat['N'] = 0;
- $totCat['M'] = array();
- foreach($months as $k => $v)
- {
- $totCat['M'][$k] = 0;
- }
-
- // Set $cpts with array of accounts in the category/group
- $cpts = $AccCat->getCptsCat($cat['rowid']);
-
- $arrayofaccountforfilter=array();
- foreach($cpts as $i => $cpt) // Loop on each account.
- {
- $arrayofaccountforfilter[]=$cpt['account_number'];
- }
-
- // N-1
- if (! empty($arrayofaccountforfilter))
- {
- $return = $AccCat->getSumDebitCredit($arrayofaccountforfilter, $date_start_previous, $date_end_previous, $cat['dc']?$cat['dc']:0);
-
- if ($return < 0) {
- setEventMessages(null, $AccCat->errors, 'errors');
- $resultNP=0;
- } else {
- foreach($cpts as $i => $cpt) // Loop on each account.
- {
- $resultNP = empty($AccCat->sdcperaccount[$cpt['account_number']])?0:$AccCat->sdcperaccount[$cpt['account_number']];
-
- $totCat['NP'] += $resultNP;
- $sommes[$code]['NP'] += $resultNP;
- $totPerAccount[$cpt['account_number']]['NP'] = $resultNP;
+ // Current fiscal year (N)
+ if (is_array($sommes) && !empty($sommes)) {
+ foreach ($sommes as $code => $det) {
+ $vars[$code] = $det['N'];
}
}
- }
- // Set value into column N and month M ($totCat)
- // This make 12 calls for each accountancy account (12 monthes M)
- foreach($cpts as $i => $cpt) // Loop on each account.
+ $result = strtr($formula, $vars);
+
+ //$r = $AccCat->calculate($result);
+ $r = dol_eval($result, 1);
+
+ print '' . price($r) . ' ';
+ $sommes[$code]['N'] += $r;
+
+ // Detail by month
+ foreach ($months as $k => $v) {
+ if (($k + 1) >= $date_startmonth) {
+ foreach ($sommes as $code => $det) {
+ $vars[$code] = $det['M'][$k];
+ }
+ $result = strtr($formula, $vars);
+
+ //$r = $AccCat->calculate($result);
+ $r = dol_eval($result, 1);
+
+ print '' . price($r) . ' ';
+ $sommes[$code]['M'][$k] += $r;
+ }
+ }
+ foreach ($months as $k => $v) {
+ if (($k + 1) < $date_startmonth) {
+ foreach ($sommes as $code => $det) {
+ $vars[$code] = $det['M'][$k];
+ }
+ $result = strtr($formula, $vars);
+
+ //$r = $AccCat->calculate($result);
+ $r = dol_eval($result, 1);
+
+ print '' . price($r) . ' ';
+ $sommes[$code]['M'][$k] += $r;
+ }
+ }
+
+ print "\n";
+
+ //var_dump($sommes);
+ } else // normal category
{
- // We make 1 loop for each account because we may want detail per account.
- // @TODO Optimize to ask a 'group by' account and a filter with account in (..., ...) in request
+ $code = $cat['code']; // Category code we process
- // Each month
- $resultN = 0;
- foreach($months as $k => $v)
+ $totCat = array();
+ $totCat['NP'] = 0;
+ $totCat['N'] = 0;
+ $totCat['M'] = array();
+ foreach ($months as $k => $v) {
+ $totCat['M'][$k] = 0;
+ }
+
+ // Set $cpts with array of accounts in the category/group
+ $cpts = $AccCat->getCptsCat($cat['rowid']);
+
+ $arrayofaccountforfilter = array();
+ foreach ($cpts as $i => $cpt) // Loop on each account.
{
- $monthtoprocess = $k+1; // ($k+1) is month 1, 2, ..., 12
- $yeartoprocess = $start_year;
- if (($k+1) < $start_month) $yeartoprocess++;
+ $arrayofaccountforfilter[] = $cpt['account_number'];
+ }
+
+ // N-1
+ if (!empty($arrayofaccountforfilter)) {
+ $return = $AccCat->getSumDebitCredit($arrayofaccountforfilter, $date_start_previous, $date_end_previous, $cat['dc'] ? $cat['dc'] : 0);
- //var_dump($monthtoprocess.'_'.$yeartoprocess);
- $return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, $cat['dc']?$cat['dc']:0, 'nofilter', $monthtoprocess, $yeartoprocess);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
- $resultM=0;
+ $resultNP = 0;
} else {
- $resultM=$AccCat->sdc;
- }
- $totCat['M'][$k] += $resultM;
- $sommes[$code]['M'][$k] += $resultM;
- $totPerAccount[$cpt['account_number']]['M'][$k] = $resultM;
+ foreach ($cpts as $i => $cpt) // Loop on each account.
+ {
+ $resultNP = empty($AccCat->sdcperaccount[$cpt['account_number']]) ? 0 : $AccCat->sdcperaccount[$cpt['account_number']];
- $resultN += $resultM;
+ $totCat['NP'] += $resultNP;
+ $sommes[$code]['NP'] += $resultNP;
+ $totPerAccount[$cpt['account_number']]['NP'] = $resultNP;
+ }
+ }
}
- $totCat['N'] += $resultN;
- $sommes[$code]['N'] += $resultN;
- $totPerAccount[$cpt['account_number']]['N'] = $resultN;
- }
-
-
- // Now output columns for row $code ('VTE', 'MAR', ...)
-
- print "";
-
- // Column group
- print '';
- print $cat['code'];
- print ' ';
-
- // Label of group
- print '';
- print $cat['label'];
- if (count($cpts) > 0) // Show example of 5 first accounting accounts
- {
- $i=0;
- foreach($cpts as $cpt)
+ // Set value into column N and month M ($totCat)
+ // This make 12 calls for each accountancy account (12 monthes M)
+ foreach ($cpts as $i => $cpt) // Loop on each account.
{
- if ($i > 5)
- {
- print '...)';
- break;
+ // We make 1 loop for each account because we may want detail per account.
+ // @TODO Optimize to ask a 'group by' account and a filter with account in (..., ...) in request
+
+ // Each month
+ $resultN = 0;
+ foreach ($months as $k => $v) {
+ $monthtoprocess = $k + 1; // ($k+1) is month 1, 2, ..., 12
+ $yeartoprocess = $start_year;
+ if (($k + 1) < $start_month)
+ $yeartoprocess++;
+
+ //var_dump($monthtoprocess.'_'.$yeartoprocess);
+ $return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, $cat['dc'] ? $cat['dc'] : 0, 'nofilter', $monthtoprocess, $yeartoprocess);
+ if ($return < 0) {
+ setEventMessages(null, $AccCat->errors, 'errors');
+ $resultM = 0;
+ } else {
+ $resultM = $AccCat->sdc;
+ }
+ $totCat['M'][$k] += $resultM;
+ $sommes[$code]['M'][$k] += $resultM;
+ $totPerAccount[$cpt['account_number']]['M'][$k] = $resultM;
+
+ $resultN += $resultM;
}
- if ($i > 0) print ', ';
- else print ' (';
- print $cpt['account_number'];
- $i++;
+
+ $totCat['N'] += $resultN;
+ $sommes[$code]['N'] += $resultN;
+ $totPerAccount[$cpt['account_number']]['N'] = $resultN;
}
- if ($i <= 5) print ')';
- }
- else
- {
- print ' - '.$langs->trans("GroupIsEmptyCheckSetup").' ';
- }
- print ' ';
- print '' . price($totCat['NP']) . ' ';
- print '' . price($totCat['N']) . ' ';
- // Each month
- foreach($totCat['M'] as $k => $v){
- if (($k+1) >= $date_startmonth) print '' . price($v) . ' ';
- }
- foreach($totCat['M'] as $k => $v){
- if (($k+1) < $date_startmonth) print '' . price($v) . ' ';
- }
+ // Now output columns for row $code ('VTE', 'MAR', ...)
- print " \n";
+ print "";
- // Loop on detail of all accounts to output the detail
- if ($showaccountdetail != 'no')
- {
- foreach($cpts as $i => $cpt)
+ // Column group
+ print '';
+ print $cat['code'];
+ print ' ';
+
+ // Label of group
+ print '';
+ print $cat['label'];
+ if (count($cpts) > 0) // Show example of 5 first accounting accounts
{
- $resultNP=$totPerAccount[$cpt['account_number']]['NP'];
- $resultN=$totPerAccount[$cpt['account_number']]['N'];
-
- if ($showaccountdetail == 'all' || $resultN > 0)
- {
- print ' ';
- print ' ';
- print '';
- print ' ' . length_accountg($cpt['account_number']);
- print ' - ';
- print $cpt['account_label'];
- print ' ';
- print '' . price($resultNP) . ' ';
- print '' . price($resultN) . ' ';
-
- // Make one call for each month
- foreach($months as $k => $v)
- {
- if (($k+1) >= $date_startmonth)
- {
- $resultM=$totPerAccount[$cpt['account_number']]['M'][$k];
- print '' . price($resultM) . ' ';
- }
+ $i = 0;
+ foreach ($cpts as $cpt) {
+ if ($i > 5) {
+ print '...)';
+ break;
}
- foreach($months as $k => $v)
- {
- if (($k+1) < $date_startmonth)
- {
- $resultM=$totPerAccount[$cpt['account_number']]['M'][$k];
- print '' . price($resultM) . ' ';
+ if ($i > 0)
+ print ', ';
+ else print ' (';
+ print $cpt['account_number'];
+ $i++;
+ }
+ if ($i <= 5)
+ print ')';
+ } else {
+ print ' - ' . $langs->trans("GroupIsEmptyCheckSetup") . ' ';
+ }
+ print '';
+
+ print '' . price($totCat['NP']) . ' ';
+ print '' . price($totCat['N']) . ' ';
+
+ // Each month
+ foreach ($totCat['M'] as $k => $v) {
+ if (($k + 1) >= $date_startmonth)
+ print '' . price($v) . ' ';
+ }
+ foreach ($totCat['M'] as $k => $v) {
+ if (($k + 1) < $date_startmonth)
+ print '' . price($v) . ' ';
+ }
+
+ print " \n";
+
+ // Loop on detail of all accounts to output the detail
+ if ($showaccountdetail != 'no') {
+ foreach ($cpts as $i => $cpt) {
+ $resultNP = $totPerAccount[$cpt['account_number']]['NP'];
+ $resultN = $totPerAccount[$cpt['account_number']]['N'];
+
+ if ($showaccountdetail == 'all' || $resultN > 0) {
+ print '';
+ print ' ';
+ print '';
+ print ' ' . length_accountg($cpt['account_number']);
+ print ' - ';
+ print $cpt['account_label'];
+ print ' ';
+ print '' . price($resultNP) . ' ';
+ print '' . price($resultN) . ' ';
+
+ // Make one call for each month
+ foreach ($months as $k => $v) {
+ if (($k + 1) >= $date_startmonth) {
+ $resultM = $totPerAccount[$cpt['account_number']]['M'][$k];
+ print '' . price($resultM) . ' ';
+ }
}
+ foreach ($months as $k => $v) {
+ if (($k + 1) < $date_startmonth) {
+ $resultM = $totPerAccount[$cpt['account_number']]['M'][$k];
+ print '' . price($resultM) . ' ';
+ }
+ }
+ print " \n";
}
- print "\n";
}
}
}
diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php
index fe29e133edc..d3093a6f374 100644
--- a/htdocs/compta/sociales/card.php
+++ b/htdocs/compta/sociales/card.php
@@ -419,7 +419,7 @@ if ($id > 0)
);
- print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CloneTax'), $langs->trans('ConfirmCloneTax', $object->ref), 'confirm_clone', $formclone, 'yes');
+ print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneTax', $object->ref), 'confirm_clone', $formclone, 'yes');
}
// Confirmation de la suppression de la charge
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index ea74e0a73db..4f0022a7796 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -1364,7 +1364,7 @@ else
} elseif ($action == 'clone') {
// Clone confirmation
$formquestion = array(array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=2 OR s.client=3)')));
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneContract'), $langs->trans('ConfirmCloneContract', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneContract', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php
index e36b80ce8ed..85d89c08e4b 100644
--- a/htdocs/core/actions_addupdatedelete.inc.php
+++ b/htdocs/core/actions_addupdatedelete.inc.php
@@ -63,6 +63,10 @@ if ($action == 'add' && ! empty($permissiontoadd))
if (! empty($object->fields[$key]['foreignkey']) && $value == '-1') $value=''; // This is an explicit foreign key field
$object->$key=$value;
+ if ($val['notnull'] > 0 && $object->$key == '' && ! is_null($val['default']) && $val['default'] == '(PROV)')
+ {
+ $object->$key = '(PROV)';
+ }
if ($val['notnull'] > 0 && $object->$key == '' && is_null($val['default']))
{
$error++;
@@ -75,7 +79,7 @@ if ($action == 'add' && ! empty($permissiontoadd))
$result=$object->create($user);
if ($result > 0)
{
- // Creation OK
+ // Creation OK
$urltogo=$backtopage?str_replace('__ID__', $result, $backtopage):$backurlforlist;
header("Location: ".$urltogo);
exit;
diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php
index ec2f539369f..8ea15b31938 100644
--- a/htdocs/core/class/commoninvoice.class.php
+++ b/htdocs/core/class/commoninvoice.class.php
@@ -517,7 +517,6 @@ abstract class CommonInvoice extends CommonObject
return dolGetStatus($labelstatut, $labelstatutShort, '', $statusType, $mode);
-
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 367fae984b6..73002dfceb4 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -7222,6 +7222,21 @@ abstract class CommonObject
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element);
}
+ // If we have a field ref with a default value of (PROV)
+ if (! $error)
+ {
+ if (key_exists('ref', $this->fields) && $this->fields['ref']['notnull'] > 0 && ! is_null($this->fields['ref']['default']) && $this->fields['ref']['default'] == '(PROV)')
+ {
+ $sql="UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref = '(PROV".$this->id.")' WHERE ref = '(PROV)' AND rowid = ".$this->id;
+ $resqlupdate = $this->db->query($sql);
+ if ($resqlupdate===false)
+ {
+ $error++;
+ $this->errors[] = $this->db->lasterror();
+ }
+ }
+ }
+
// Create extrafields
if (! $error)
{
diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php
index a599137109d..27d087b2fde 100644
--- a/htdocs/core/class/notify.class.php
+++ b/htdocs/core/class/notify.class.php
@@ -459,7 +459,7 @@ class Notify
$dir_output = $conf->fournisseur->commande->dir_output;
$object_type = 'order_supplier';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n";
- $mesg.= $outputlangs->transnoentitiesnoconv("EMailTextOrderValidatedBy", $newref, $user->getFullName($langs));
+ $mesg.= $outputlangs->transnoentitiesnoconv("EMailTextOrderValidatedBy", $newref, $user->getFullName($outputlangs));
$mesg.= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n";
break;
case 'ORDER_SUPPLIER_APPROVE':
@@ -467,7 +467,7 @@ class Notify
$dir_output = $conf->fournisseur->commande->dir_output;
$object_type = 'order_supplier';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n";
- $mesg.= $outputlangs->transnoentitiesnoconv("EMailTextOrderApprovedBy", $newref, $user->getFullName($langs));
+ $mesg.= $outputlangs->transnoentitiesnoconv("EMailTextOrderApprovedBy", $newref, $user->getFullName($outputlangs));
$mesg.= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n";
break;
case 'ORDER_SUPPLIER_REFUSE':
@@ -475,7 +475,7 @@ class Notify
$dir_output = $conf->fournisseur->commande->dir_output;
$object_type = 'order_supplier';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n";
- $mesg.= $outputlangs->transnoentitiesnoconv("EMailTextOrderRefusedBy", $newref, $user->getFullName($langs));
+ $mesg.= $outputlangs->transnoentitiesnoconv("EMailTextOrderRefusedBy", $newref, $user->getFullName($outputlangs));
$mesg.= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n";
break;
case 'SHIPPING_VALIDATE':
diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php
index 56ae3405a98..f8cb32896f2 100644
--- a/htdocs/core/class/translate.class.php
+++ b/htdocs/core/class/translate.class.php
@@ -944,7 +944,7 @@ class Translate
* If mb_convert_encoding is not available, return currency code.
*
* @param string $currency_code Currency code
- * @param integer $forceloadall 1=Force to load all currencies into cache. We know we need to use all of them. By default read and cache only required currency.
+ * @param integer $forceloadall 1=Force to load all currencies into cache. We know we need to use all of them. By default read and cache only the requested currency.
* @return string Currency symbol encoded into UTF8
*/
public function getCurrencySymbol($currency_code, $forceloadall = 0)
diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php
index a5a3bd8aca9..d3f8e55832a 100644
--- a/htdocs/core/class/utils.class.php
+++ b/htdocs/core/class/utils.class.php
@@ -611,7 +611,8 @@ class Utils
if (count($arrayversion))
{
$FILENAMEASCII=strtolower($module).'.asciidoc';
- $FILENAMEDOC=strtolower($module).'.html'; // TODO Use/text PDF
+ $FILENAMEDOC=strtolower($module).'.html';
+ $FILENAMEDOCPDF=strtolower($module).'.pdf';
$dirofmodule = dol_buildpath(strtolower($module), 0);
$dirofmoduledoc = dol_buildpath(strtolower($module), 0).'/doc';
@@ -627,8 +628,7 @@ class Utils
return -1;
}
- $conf->global->MODULEBUILDER_ASCIIDOCTOR='asciidoctor';
- if (empty($conf->global->MODULEBUILDER_ASCIIDOCTOR))
+ if (empty($conf->global->MODULEBUILDER_ASCIIDOCTOR) && empty($conf->global->MODULEBUILDER_ASCIIDOCTORPDF))
{
$this->error = 'Setup of module ModuleBuilder not complete';
return -1;
@@ -690,11 +690,13 @@ class Utils
$currentdir = getcwd();
chdir($dirofmodule);
+ require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php';
+ $utils = new Utils($db);
+
+ // Build HTML doc
$command=$conf->global->MODULEBUILDER_ASCIIDOCTOR.' '.$destfile.' -n -o '.$dirofmoduledoc.'/'.$FILENAMEDOC;
$outfile=$dirofmoduletmp.'/out.tmp';
- require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php';
- $utils = new Utils($db);
$resarray = $utils->executeCLI($command, $outfile);
if ($resarray['result'] != '0')
{
@@ -702,6 +704,16 @@ class Utils
}
$result = ($resarray['result'] == 0) ? 1 : 0;
+ // Build PDF doc
+ $command=$conf->global->MODULEBUILDER_ASCIIDOCTORPDF.' '.$destfile.' -n -o '.$dirofmoduledoc.'/'.$FILENAMEDOCPDF;
+ $outfile=$dirofmoduletmp.'/outpdf.tmp';
+ $resarray = $utils->executeCLI($command, $outfile);
+ if ($resarray['result'] != '0')
+ {
+ $this->error = $resarray['error'].' '.$resarray['output'];
+ }
+ $result = ($resarray['result'] == 0) ? 1 : 0;
+
chdir($currentdir);
}
else
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index f223982ba6e..8750b943685 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -1790,9 +1790,9 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang
if (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i', $time, $reg)
|| preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])$/i', $time, $reg)) // Deprecated. Ex: 1970-01-01, 1970-01-01 01:00:00, 19700101010000
{
- // TODO Remove this.
- // This part of code should not be used.
+ // TODO Remove this. This part of code should not be used.
dol_syslog("Functions.lib::dol_print_date function call with deprecated value of time in page ".$_SERVER["PHP_SELF"], LOG_ERR);
+ //if (function_exists('debug_print_backtrace')) debug_print_backtrace();
// Date has format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' or 'YYYYMMDDHHMMSS'
$syear = (! empty($reg[1]) ? $reg[1] : '');
$smonth = (! empty($reg[2]) ? $reg[2] : '');
@@ -2979,8 +2979,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
//if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
if (empty($srconly) && in_array($pictowithoutext, array(
- 'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
- 'note', 'sign-out', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow', '1leftarrow', '1rightarrow',
+ 'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'note', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
+ 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow', '1leftarrow', '1rightarrow',
'jabber','skype','twitter','facebook','linkedin'
)
)) {
@@ -2989,7 +2989,11 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$fakey = $pictowithoutext;
$facolor = ''; $fasize = '';
$marginleftonlyshort = 2;
- if ($pictowithoutext == 'switch_off') {
+ if ($pictowithoutext == 'setup') {
+ $fakey = 'fa-cog';
+ $fasize = '1.4em';
+ }
+ elseif ($pictowithoutext == 'switch_off') {
$fakey = 'fa-toggle-off';
$facolor = '#999';
$fasize = '2em';
@@ -3001,10 +3005,20 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
}
elseif ($pictowithoutext == 'off') {
$fakey = 'fa-square-o';
+ if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5))
+ {
+ $fakey = 'fa-square';
+ $fa='far';
+ }
$fasize = '1.3em';
}
elseif ($pictowithoutext == 'on') {
$fakey = 'fa-check-square-o';
+ if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5))
+ {
+ $fakey = 'fa-check-square';
+ $fa='far';
+ }
$fasize = '1.3em';
}
elseif ($pictowithoutext == 'bank') {
@@ -3046,6 +3060,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
}
elseif ($pictowithoutext == 'note') {
$fakey = 'fa-sticky-note-o';
+ if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5))
+ {
+ $fakey = 'fa-sticky-note'; $fa = 'far';
+ }
$facolor = '#999';
$marginleftonlyshort=1;
}
@@ -4377,7 +4395,7 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
{
if ($currency_code == 'auto') $currency_code=$conf->currency;
- $listofcurrenciesbefore=array('USD','GBP','AUD','MXN','PEN','CNY');
+ $listofcurrenciesbefore=array('USD','GBP','AUD','HKD','MXN','PEN','CNY');
$listoflanguagesbefore=array('nl_NL');
if (in_array($currency_code, $listofcurrenciesbefore) || in_array($outlangs->defaultlang, $listoflanguagesbefore))
{
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 968abcb0687..4a7fbf6ac98 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -1192,69 +1192,40 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$permtoshowmenu=(! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire);
//$newmenu->add("/accountancy/index.php?leftmenu=accountancy", $langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy');
- // Chart of account
- $newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"), 0, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin', 1);
- if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/', $leftmenu)) {
- $newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("General"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_general', 10);
- $newmenu->add("/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingJournals"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_journal', 20);
- $newmenu->add("/accountancy/admin/accountmodel.php?id=31&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Pcg_version"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chartmodel', 30);
- $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 40);
- $newmenu->add("/accountancy/admin/categories_list.php?id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingCategory"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 41);
- $newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 50);
- if (! empty($conf->banque->enabled)) {
- $newmenu->add("/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", $langs->trans("MenuBankAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_bank', 51);
- }
- if (! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled)) {
- $newmenu->add("/admin/dict.php?id=10&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuVatAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 52);
- }
- if (! empty($conf->tax->enabled)) {
- $newmenu->add("/admin/dict.php?id=7&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuTaxAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 53);
- }
- if (! empty($conf->expensereport->enabled)) {
- $newmenu->add("/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuExpenseReportAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 54);
- }
- $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuProductsAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_product', 55);
- $newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ExportOptions"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_export', 60);
- $newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_closure', 70);
+ // Transfer in accounting
+ $newmenu->add("/accountancy/index.php?leftmenu=accountancy_transfer", $langs->trans("TransferInAccounting"), 0, $user->rights->accounting->bind->write, '', $mainmenu, 'transfer', 1);
- // Fiscal year
- if ($conf->global->MAIN_FEATURES_LEVEL > 1) {
- // Not yet used. In a future will lock some periods.
- $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear');
+ // Binding
+ // $newmenu->add("", $langs->trans("Binding"), 0, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch');
+ if (! empty($conf->facture->enabled))
+ {
+ $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", $langs->trans("CustomersVentilation"), 1, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_customer');
+ if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_customer/', $leftmenu)) {
+ $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("ToBind"), 2, $user->rights->accounting->bind->write);
+ $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("Binded"), 2, $user->rights->accounting->bind->write);
+ }
}
- }
-
- // Binding
- $newmenu->add("", $langs->trans("Binding"), 0, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch');
- if (! empty($conf->facture->enabled))
- {
- $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", $langs->trans("CustomersVentilation"), 1, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_customer');
- if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_customer/', $leftmenu)) {
- $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("ToBind"), 2, $user->rights->accounting->bind->write);
- $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("Binded"), 2, $user->rights->accounting->bind->write);
+ if (! empty($conf->supplier_invoice->enabled))
+ {
+ $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", $langs->trans("SuppliersVentilation"), 1, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_supplier');
+ if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_supplier/', $leftmenu)) {
+ $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("ToBind"), 2, $user->rights->accounting->bind->write);
+ $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("Binded"), 2, $user->rights->accounting->bind->write);
+ }
}
- }
- if (! empty($conf->supplier_invoice->enabled))
- {
- $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", $langs->trans("SuppliersVentilation"), 1, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_supplier');
- if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_supplier/', $leftmenu)) {
- $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("ToBind"), 2, $user->rights->accounting->bind->write);
- $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("Binded"), 2, $user->rights->accounting->bind->write);
+ if (! empty($conf->expensereport->enabled))
+ {
+ $newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", $langs->trans("ExpenseReportsVentilation"), 1, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_expensereport');
+ if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_expensereport/', $leftmenu)) {
+ $newmenu->add("/accountancy/expensereport/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("ToBind"), 2, $user->rights->accounting->bind->write);
+ $newmenu->add("/accountancy/expensereport/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("Binded"), 2, $user->rights->accounting->bind->write);
+ }
}
- }
- if (! empty($conf->expensereport->enabled))
- {
- $newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", $langs->trans("ExpenseReportsVentilation"), 1, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_expensereport');
- if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_expensereport/', $leftmenu)) {
- $newmenu->add("/accountancy/expensereport/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("ToBind"), 2, $user->rights->accounting->bind->write);
- $newmenu->add("/accountancy/expensereport/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("Binded"), 2, $user->rights->accounting->bind->write);
- }
- }
// Journals
if(! empty($conf->accounting->enabled) && ! empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy')
{
- $newmenu->add('', $langs->trans("Journalization"), 0, $user->rights->accounting->comptarapport->lire);
+ $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->rights->accounting->comptarapport->lire);
// Multi journal
$sql = "SELECT rowid, code, label, nature";
@@ -1296,7 +1267,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
{
$langs->load('accountancy');
$journallabel=$langs->transnoentities($objp->label); // Labels in this table are set by loading llx_accounting_abc.sql. Label can be 'ACCOUNTING_SELL_JOURNAL', 'InventoryJournal', ...
- $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $journallabel, 1, $user->rights->accounting->comptarapport->lire);
+ $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $journallabel, 2, $user->rights->accounting->comptarapport->lire);
}
$i++;
}
@@ -1311,22 +1282,26 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$db->free($resql);
}
- // General Ledger
- $newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_generalledger", $langs->trans("Bookkeeping"), 0, $user->rights->accounting->mouvements->lire);
+ // Accounting
+ $newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->rights->accounting->mouvements->lire, '', $mainmenu, 'accountancy', 1);
+
+
+ // General Ledger
+ $newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Bookkeeping"), 1, $user->rights->accounting->mouvements->lire);
// Balance
- $newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_balance", $langs->trans("AccountBalance"), 0, $user->rights->accounting->mouvements->lire);
+ $newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->rights->accounting->mouvements->lire);
// Files
if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2)
{
- $newmenu->add("/compta/compta-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 0, $user->rights->accounting->mouvements->lire);
+ $newmenu->add("/compta/compta-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->rights->accounting->mouvements->lire);
}
// Reports
$langs->load("compta");
- $newmenu->add("/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report", $langs->trans("Reportings"), 0, $user->rights->accounting->comptarapport->lire, '', $mainmenu, 'ca');
+ $newmenu->add("/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report", $langs->trans("Reportings"), 1, $user->rights->accounting->comptarapport->lire, '', $mainmenu, 'ca');
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) {
$newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report", $langs->trans("MenuReportInOut"), 2, $user->rights->accounting->comptarapport->lire);
@@ -1352,49 +1327,81 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
if ($modecompta)
{
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) {
- $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 2, $user->rights->accounting->comptarapport->lire);
+ $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 2, $user->rights->accounting->comptarapport->lire);
$newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->rights->accounting->comptarapport->lire);
$newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->rights->accounting->comptarapport->lire);
//$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"),3,$user->rights->accounting->comptarapport->lire);
//$newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"),3,$user->rights->accounting->comptarapport->lire);
}
}
- }
- // Accountancy (simple)
- if (! empty($conf->comptabilite->enabled))
- {
- $langs->load("compta");
+ // Accountancy (simple)
+ if (! empty($conf->comptabilite->enabled))
+ {
+ $langs->load("compta");
- // Bilan, resultats
- $newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->rights->compta->resultat->lire, '', $mainmenu, 'ca');
+ // Bilan, resultats
+ $newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->rights->compta->resultat->lire, '', $mainmenu, 'ca');
- if ($usemenuhider || empty($leftmenu) || preg_match('/report/', $leftmenu)) {
- $newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->rights->compta->resultat->lire);
- $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire);
- /* On verra ca avec module compabilite expert
- $newmenu->add("/compta/resultat/compteres.php?leftmenu=report","Compte de resultat",2,$user->rights->compta->resultat->lire);
- $newmenu->add("/compta/resultat/bilan.php?leftmenu=report","Bilan",2,$user->rights->compta->resultat->lire);
- */
- $newmenu->add("/compta/stats/index.php?leftmenu=report", $langs->trans("ReportTurnover"), 1, $user->rights->compta->resultat->lire);
+ if ($usemenuhider || empty($leftmenu) || preg_match('/report/', $leftmenu)) {
+ $newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->rights->compta->resultat->lire);
+ $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire);
+ /* On verra ca avec module compabilite expert
+ $newmenu->add("/compta/resultat/compteres.php?leftmenu=report","Compte de resultat",2,$user->rights->compta->resultat->lire);
+ $newmenu->add("/compta/resultat/bilan.php?leftmenu=report","Bilan",2,$user->rights->compta->resultat->lire);
+ */
+ $newmenu->add("/compta/stats/index.php?leftmenu=report", $langs->trans("ReportTurnover"), 1, $user->rights->compta->resultat->lire);
- /*
- $newmenu->add("/compta/stats/cumul.php?leftmenu=report","Cumule",2,$user->rights->compta->resultat->lire);
- if (! empty($conf->propal->enabled)) {
- $newmenu->add("/compta/stats/prev.php?leftmenu=report","Previsionnel",2,$user->rights->compta->resultat->lire);
- $newmenu->add("/compta/stats/comp.php?leftmenu=report","Transforme",2,$user->rights->compta->resultat->lire);
- }
- */
- $newmenu->add("/compta/stats/casoc.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire);
- $newmenu->add("/compta/stats/cabyuser.php?leftmenu=report", $langs->trans("ByUsers"), 2, $user->rights->compta->resultat->lire);
- $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report", $langs->trans("ByProductsAndServices"), 2, $user->rights->compta->resultat->lire);
- $newmenu->add("/compta/stats/byratecountry.php?leftmenu=report", $langs->trans("ByVatRate"), 2, $user->rights->compta->resultat->lire);
+ /*
+ $newmenu->add("/compta/stats/cumul.php?leftmenu=report","Cumule",2,$user->rights->compta->resultat->lire);
+ if (! empty($conf->propal->enabled)) {
+ $newmenu->add("/compta/stats/prev.php?leftmenu=report","Previsionnel",2,$user->rights->compta->resultat->lire);
+ $newmenu->add("/compta/stats/comp.php?leftmenu=report","Transforme",2,$user->rights->compta->resultat->lire);
+ }
+ */
+ $newmenu->add("/compta/stats/casoc.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire);
+ $newmenu->add("/compta/stats/cabyuser.php?leftmenu=report", $langs->trans("ByUsers"), 2, $user->rights->compta->resultat->lire);
+ $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report", $langs->trans("ByProductsAndServices"), 2, $user->rights->compta->resultat->lire);
+ $newmenu->add("/compta/stats/byratecountry.php?leftmenu=report", $langs->trans("ByVatRate"), 2, $user->rights->compta->resultat->lire);
- // Journaux
- $newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 50);
- $newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 51);
+ // Journaux
+ $newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 50);
+ $newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 51);
+ }
+ //if ($leftmenu=="ca") $newmenu->add("/compta/journaux/index.php?leftmenu=ca",$langs->trans("Journaux"),1,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire);
+ }
+
+ // Configuration
+ $newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"), 0, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin', 1);
+ if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/', $leftmenu)) {
+ $newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("General"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_general', 10);
+
+ // Fiscal year - Not really yet used. In a future will lock some periods.
+ if ($conf->global->MAIN_FEATURES_LEVEL > 1) {
+ $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear', 20);
+ }
+
+ $newmenu->add("/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingJournals"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_journal', 30);
+ $newmenu->add("/accountancy/admin/accountmodel.php?id=31&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Pcg_version"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chartmodel', 40);
+ $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 41);
+ $newmenu->add("/accountancy/admin/categories_list.php?id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingCategory"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 50);
+ $newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 60);
+ if (! empty($conf->banque->enabled)) {
+ $newmenu->add("/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", $langs->trans("MenuBankAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_bank', 70);
+ }
+ if (! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled)) {
+ $newmenu->add("/admin/dict.php?id=10&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuVatAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 80);
+ }
+ if (! empty($conf->tax->enabled)) {
+ $newmenu->add("/admin/dict.php?id=7&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuTaxAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 90);
+ }
+ if (! empty($conf->expensereport->enabled)) {
+ $newmenu->add("/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuExpenseReportAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 100);
+ }
+ $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuProductsAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_product', 110);
+ $newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_closure', 120);
+ $newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ExportOptions"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_export', 130);
}
- //if ($leftmenu=="ca") $newmenu->add("/compta/journaux/index.php?leftmenu=ca",$langs->trans("Journaux"),1,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire);
}
// Assets
@@ -1587,7 +1594,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->rights->expedition->lire);
}
- // Receptions
+ // Receptions
if (! empty($conf->reception->enabled))
{
$langs->load("receptions");
@@ -1611,7 +1618,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
{
$langs->load("mrp");
- $newmenu->add("", $langs->trans("BOM"), 0, $user->rights->service->lire, '', $mainmenu, 'service');
+ $newmenu->add("", $langs->trans("MenuBOM"), 0, $user->rights->service->lire, '', $mainmenu, 'service');
$newmenu->add("/bom/bom_card.php?leftmenu=bom&action=create", $langs->trans("NewBOM"), 1, $user->rights->bom->write);
$newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->rights->bom->read);
}
diff --git a/htdocs/core/tpl/commonfields_edit.tpl.php b/htdocs/core/tpl/commonfields_edit.tpl.php
index 4984c2d938e..d6b70d86a2d 100644
--- a/htdocs/core/tpl/commonfields_edit.tpl.php
+++ b/htdocs/core/tpl/commonfields_edit.tpl.php
@@ -38,7 +38,7 @@ $object->fields = dol_sort_array($object->fields, 'position');
foreach($object->fields as $key => $val)
{
// Discard if extrafield is a hidden field on form
- if (abs($val['visible']) != 1) continue;
+ if (abs($val['visible']) != 1 && abs($val['visible']) != 4) continue;
if (array_key_exists('enabled', $val) && isset($val['enabled']) && ! verifCond($val['enabled'])) continue; // We don't want this field
diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php
index b6b2e572e49..c7a61328c68 100644
--- a/htdocs/core/tpl/commonfields_view.tpl.php
+++ b/htdocs/core/tpl/commonfields_view.tpl.php
@@ -40,7 +40,7 @@ $object->fields = dol_sort_array($object->fields, 'position');
foreach($object->fields as $key => $val)
{
// Discard if extrafield is a hidden field on form
- if (abs($val['visible']) != 1) continue;
+ if (abs($val['visible']) != 1 && abs($val['visible']) != 4) continue;
if (array_key_exists('enabled', $val) && isset($val['enabled']) && ! verifCond($val['enabled'])) continue; // We don't want this field
if (in_array($key, array('ref','status'))) continue; // Ref and status are already in dol_banner
diff --git a/htdocs/datapolicy/class/actions_datapolicy.class.php b/htdocs/datapolicy/class/actions_datapolicy.class.php
index e336e8d6df6..1243b5d057e 100644
--- a/htdocs/datapolicy/class/actions_datapolicy.class.php
+++ b/htdocs/datapolicy/class/actions_datapolicy.class.php
@@ -448,6 +448,8 @@ class ActionsDatapolicy
}
}
- echo $jsscript;
+ $this->resprint = $jsscript;
+
+ return 0;
}
}
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index 62ab3452562..5a063fcbf4a 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -2118,7 +2118,7 @@ elseif ($id || $ref)
if ($obj)
{
// $obj->rowid is rowid in $origin."det" table
- $alreadysent[$obj->rowid][$obj->shipmentline_id]=array('shipment_ref'=>$obj->shipment_ref, 'shipment_id'=>$obj->shipment_id, 'warehouse'=>$obj->fk_entrepot, 'qty_shipped'=>$obj->qty_shipped, 'date_valid'=>$obj->date_valid, 'date_delivery'=>$obj->date_delivery);
+ $alreadysent[$obj->rowid][$obj->shipmentline_id]=array('shipment_ref'=>$obj->shipment_ref, 'shipment_id'=>$obj->shipment_id, 'warehouse'=>$obj->fk_entrepot, 'qty_shipped'=>$obj->qty_shipped, 'date_valid'=>$db->jdate($obj->date_valid), 'date_delivery'=>$db->jdate($obj->date_delivery));
}
$i++;
}
diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php
index b7cb41f389a..c6d87acef4d 100644
--- a/htdocs/expensereport/card.php
+++ b/htdocs/expensereport/card.php
@@ -933,7 +933,7 @@ if (empty($reshook))
}
}
- if ($action == "confirm_brouillonner" && GETPOST('confirm', 'alpha')=="yes" && $id > 0 && $user->rights->expensereport->creer)
+ if ($action == "confirm_setdraft" && GETPOST('confirm', 'alpha')=="yes" && $id > 0 && $user->rights->expensereport->creer)
{
$object = new ExpenseReport($db);
$object->fetch($id);
@@ -1606,7 +1606,7 @@ else
array('type' => 'other','name' => 'fk_user_author','label' => $langs->trans("SelectTargetUser"),'value' => $form->select_dolusers((GETPOST('fk_user_author', 'int')> 0 ? GETPOST('fk_user_author', 'int') : $user->id), 'fk_user_author', 0, null, 0, $criteriaforfilter))
);
// Paiement incomplet. On demande si motif = escompte ou autre
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneExpenseReport'), $langs->trans('ConfirmCloneExpenseReport', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneExpenseReport', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
if ($action == 'save')
@@ -1640,9 +1640,9 @@ else
$formconfirm=$form->formconfirm($_SEVER["PHP_SELF"]."?id=".$id, $langs->trans("Cancel"), "", "confirm_cancel", $array_input, "", 1);
}
- if ($action == 'brouillonner')
+ if ($action == 'setdraft')
{
- $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("BrouillonnerTrip"), $langs->trans("ConfirmBrouillonnerTrip"), "confirm_brouillonner", "", "", 1);
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("BrouillonnerTrip"), $langs->trans("ConfirmBrouillonnerTrip"), "confirm_setdraft", "", "", 1);
}
if ($action == 'refuse') // Deny
@@ -2431,7 +2431,7 @@ if ($action != 'create' && $action != 'edit')
// Modify
print '';
- // Brouillonner (le statut refusée est identique à brouillon)
+ // setdraft (le statut refusée est identique à brouillon)
//print ''.$langs->trans('BROUILLONNER').' ';
// Enregistrer depuis le statut "Refusée"
print '';
@@ -2442,8 +2442,8 @@ if ($action != 'create' && $action != 'edit')
{
if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid)
{
- // Brouillonner
- print '';
+ // setdraft
+ print '';
}
}
@@ -2456,8 +2456,8 @@ if ($action != 'create' && $action != 'edit')
{
if (in_array($object->fk_user_author, $user->getAllChildIds(1)))
{
- // Brouillonner
- print '';
+ // set draft
+ print '';
}
}
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index 3230092b541..d9434d018c3 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -1013,8 +1013,8 @@ if ($action == 'create')
// Amount
/* Hide amount because we only copy services so amount may differ than source
- print '' . $langs->trans('TotalHT') . ' ' . price($objectsrc->total_ht) . ' ';
- print '' . $langs->trans('TotalVAT') . ' ' . price($objectsrc->total_tva) . " ";
+ print '' . $langs->trans('AmountHT') . ' ' . price($objectsrc->total_ht) . ' ';
+ print '' . $langs->trans('AmountVAT') . ' ' . price($objectsrc->total_tva) . " ";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE
{
print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ' ' . price($objectsrc->total_localtax1) . " ";
@@ -1025,13 +1025,13 @@ if ($action == 'create')
print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ' ' . price($objectsrc->total_localtax2) . " ";
}
- print '' . $langs->trans('TotalTTC') . ' ' . price($objectsrc->total_ttc) . " ";
+ print '' . $langs->trans('AmountTTC') . ' ' . price($objectsrc->total_ttc) . " ";
if (!empty($conf->multicurrency->enabled))
{
- print '' . $langs->trans('MulticurrencyTotalHT') . ' ' . price($objectsrc->multicurrency_total_ht) . ' ';
- print '' . $langs->trans('MulticurrencyTotalVAT') . ' ' . price($objectsrc->multicurrency_total_tva) . " ";
- print '' . $langs->trans('MulticurrencyTotalTTC') . ' ' . price($objectsrc->multicurrency_total_ttc) . " ";
+ print '' . $langs->trans('MulticurrencyAmountHT') . ' ' . price($objectsrc->multicurrency_total_ht) . ' ';
+ print '' . $langs->trans('MulticurrencyAmountVAT') . ' ' . price($objectsrc->multicurrency_total_tva) . " ";
+ print '' . $langs->trans('MulticurrencyAmountTTC') . ' ' . price($objectsrc->multicurrency_total_ttc) . " ";
}
*/
}
@@ -1170,7 +1170,7 @@ elseif ($id > 0 || ! empty($ref))
// => 1),
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '', '', 0, 0, null, 0, 'minwidth200')));
// Paiement incomplet. On demande si motif = escompte ou autre
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneIntervention'), $langs->trans('ConfirmCloneIntervention', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneIntervention', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
if (!$formconfirm)
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 045beb3bb0c..7c4b09a6f6c 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -1611,8 +1611,8 @@ if ($action=='create')
$newclassname = $classname;
print '' . $langs->trans($newclassname) . ' ' . $objectsrc->getNomUrl(1) . ' ';
- print '' . $langs->trans('TotalHT') . ' ' . price($objectsrc->total_ht) . ' ';
- print '' . $langs->trans('TotalVAT') . ' ' . price($objectsrc->total_tva) . " ";
+ print '' . $langs->trans('AmountHT') . ' ' . price($objectsrc->total_ht) . ' ';
+ print '' . $langs->trans('AmountVAT') . ' ' . price($objectsrc->total_tva) . " ";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE
{
print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ' ' . price($objectsrc->total_localtax1) . " ";
@@ -1623,13 +1623,13 @@ if ($action=='create')
print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ' ' . price($objectsrc->total_localtax2) . " ";
}
- print '' . $langs->trans('TotalTTC') . ' ' . price($objectsrc->total_ttc) . " ";
+ print '' . $langs->trans('AmountTTC') . ' ' . price($objectsrc->total_ttc) . " ";
if (!empty($conf->multicurrency->enabled))
{
- print '' . $langs->trans('MulticurrencyTotalHT') . ' ' . price($objectsrc->multicurrency_total_ht) . ' ';
- print '' . $langs->trans('MulticurrencyTotalVAT') . ' ' . price($objectsrc->multicurrency_total_tva) . ' ';
- print '' . $langs->trans('MulticurrencyTotalTTC') . ' ' . price($objectsrc->multicurrency_total_ttc) . ' ';
+ print '' . $langs->trans('MulticurrencyAmountHT') . ' ' . price($objectsrc->multicurrency_total_ht) . ' ';
+ print '' . $langs->trans('MulticurrencyAmountVAT') . ' ' . price($objectsrc->multicurrency_total_tva) . ' ';
+ print '' . $langs->trans('MulticurrencyAmountTTC') . ' ' . price($objectsrc->multicurrency_total_ttc) . ' ';
}
}
@@ -1705,7 +1705,7 @@ elseif (! empty($object->id))
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1)
);
// Paiement incomplet. On demande si motif = escompte ou autre
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
// Confirmation de la validation
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 03f3442351d..2fc36516bc6 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -2093,8 +2093,8 @@ if ($action == 'create')
echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['invoice_supplier'])->getNomUrl(1).')';
}
echo '';
- print ''.$langs->trans('TotalHT').' '.price($objectsrc->total_ht).' ';
- print ''.$langs->trans('TotalVAT').' '.price($objectsrc->total_tva)." ";
+ print ''.$langs->trans('AmountHT').' '.price($objectsrc->total_ht).' ';
+ print ''.$langs->trans('AmountVAT').' '.price($objectsrc->total_tva)." ";
if ($mysoc->localtax1_assuj=="1" || $object->total_localtax1 != 0) //Localtax1
{
print ''.$langs->transcountry("AmountLT1", $mysoc->country_code).' '.price($objectsrc->total_localtax1)." ";
@@ -2104,13 +2104,13 @@ if ($action == 'create')
{
print ''.$langs->transcountry("AmountLT2", $mysoc->country_code).' '.price($objectsrc->total_localtax2)." ";
}
- print ''.$langs->trans('TotalTTC').' '.price($objectsrc->total_ttc)." ";
+ print ''.$langs->trans('AmountTTC').' '.price($objectsrc->total_ttc)." ";
if (!empty($conf->multicurrency->enabled))
{
- print '' . $langs->trans('MulticurrencyTotalHT') . ' ' . price($objectsrc->multicurrency_total_ht) . ' ';
- print '' . $langs->trans('MulticurrencyTotalVAT') . ' ' . price($objectsrc->multicurrency_total_tva) . " ";
- print '' . $langs->trans('MulticurrencyTotalTTC') . ' ' . price($objectsrc->multicurrency_total_ttc) . " ";
+ print '' . $langs->trans('MulticurrencyAmountHT') . ' ' . price($objectsrc->multicurrency_total_ht) . ' ';
+ print '' . $langs->trans('MulticurrencyAmountVAT') . ' ' . price($objectsrc->multicurrency_total_tva) . " ";
+ print '' . $langs->trans('MulticurrencyAmountTTC') . ' ' . price($objectsrc->multicurrency_total_ttc) . " ";
}
}
@@ -2232,7 +2232,7 @@ else
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
);
// Paiement incomplet. On demande si motif = escompte ou autre
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
// Confirmation de la validation
diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php
index 3751935b81c..2985386676f 100644
--- a/htdocs/hrm/index.php
+++ b/htdocs/hrm/index.php
@@ -226,8 +226,8 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read)
$starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning';
$endhalfday=($obj->halfday == 1 || $obj->halfday == 2)?'morning':'afternoon';
- print ''.dol_print_date($obj->date_start, 'day').' '.$langs->trans($listhalfday[$starthalfday]);
- print ' '.dol_print_date($obj->date_end, 'day').' '.$langs->trans($listhalfday[$endhalfday]);
+ print ' '.dol_print_date($db->jdate($obj->date_start), 'day').' '.$langs->trans($listhalfday[$starthalfday]);
+ print ' '.dol_print_date($db->jdate($obj->date_end), 'day').' '.$langs->trans($listhalfday[$endhalfday]);
print ' '.dol_print_date($db->jdate($obj->dm), 'day').' ';
print ''.$holidaystatic->LibStatut($obj->status, 3).' ';
print '';
diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql
index 0d48fa89718..0f84c92ef22 100644
--- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql
+++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql
@@ -111,7 +111,7 @@ ALTER TABLE llx_c_shipment_mode ADD COLUMN tracking VARCHAR(255) NOT NULL DEFAUL
-- VMYSQL4.3 ALTER TABLE llx_c_shipment_mode CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
-- VPGSQL8.2 DROP table llx_c_shipment_mode;
--- VPGSQL8.2 CREATE TABLE llx_c_shipment_mode (rowid SERIAL PRIMARY KEY, tms timestamp, code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, tracking varchar(256) NOT NULL, active integer DEFAULT 0, module varchar(32) NULL);
+-- VPGSQL8.2 CREATE TABLE llx_c_shipment_mode (rowid SERIAL PRIMARY KEY, tms timestamp, code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, tracking varchar(255) NOT NULL, active integer DEFAULT 0, module varchar(32) NULL);
-- VPGSQL8.2 INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (1,'CATCH','Catch','Catch by client','',1);
-- VPGSQL8.2 INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (2,'TRANS','Transporter','Generic transporter','',1);
-- VPGSQL8.2 INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi','',0);
diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
index 891f79edc0f..ebcca580870 100755
--- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
+++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
@@ -666,11 +666,11 @@ ALTER TABLE llx_actioncomm DROP INDEX idx_actioncomm_datea;
ALTER TABLE llx_actioncomm DROP COLUMN datea2;
-- Email tracking
-ALTER TABLE llx_actioncomm ADD COLUMN email_msgid varchar(256);
-ALTER TABLE llx_actioncomm ADD COLUMN email_from varchar(256);
-ALTER TABLE llx_actioncomm ADD COLUMN email_sender varchar(256);
-ALTER TABLE llx_actioncomm ADD COLUMN email_to varchar(256);
-ALTER TABLE llx_actioncomm ADD COLUMN errors_to varchar(256);
+ALTER TABLE llx_actioncomm ADD COLUMN email_msgid varchar(255);
+ALTER TABLE llx_actioncomm ADD COLUMN email_from varchar(255);
+ALTER TABLE llx_actioncomm ADD COLUMN email_sender varchar(255);
+ALTER TABLE llx_actioncomm ADD COLUMN email_to varchar(255);
+ALTER TABLE llx_actioncomm ADD COLUMN errors_to varchar(255);
-- Recurring events
ALTER TABLE llx_actioncomm ADD COLUMN recurid varchar(128);
diff --git a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql
index d72777db230..f749e57b432 100644
--- a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql
+++ b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql
@@ -42,9 +42,9 @@ ALTER TABLE llx_product_customer_price_log ADD COLUMN localtax2_type varchar(10)
UPDATE llx_user set api_key = null where api_key = '';
-ALTER TABLE llx_actioncomm ADD COLUMN email_subject varchar(256) after email_msgid;
-ALTER TABLE llx_actioncomm ADD COLUMN email_tocc varchar(256) after email_to;
-ALTER TABLE llx_actioncomm ADD COLUMN email_tobcc varchar(256) after email_tocc;
+ALTER TABLE llx_actioncomm ADD COLUMN email_subject varchar(255) after email_msgid;
+ALTER TABLE llx_actioncomm ADD COLUMN email_tocc varchar(255) after email_to;
+ALTER TABLE llx_actioncomm ADD COLUMN email_tobcc varchar(255) after email_tocc;
ALTER TABLE llx_user MODIFY COLUMN pass varchar(128);
diff --git a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql
index 575573c41c9..937d7cbc401 100644
--- a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql
+++ b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql
@@ -48,6 +48,9 @@ create table llx_facture_rec_extrafields
import_key varchar(14)
) ENGINE=innodb;
+ALTER TABLE llx_actioncomm ADD COLUMN email_subject varchar(255) after email_msgid;
+ALTER TABLE llx_actioncomm ADD COLUMN email_tocc varchar(255) after email_to;
+ALTER TABLE llx_actioncomm ADD COLUMN email_tobcc varchar(255) after email_tocc;
-- For 9.0
ALTER TABLE llx_extrafields ADD COLUMN help text NULL;
diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql
index 4b6a511d0e5..f88b7113037 100644
--- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql
+++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql
@@ -186,8 +186,10 @@ CREATE TABLE llx_bom_bom(
note_private text,
date_creation datetime NOT NULL,
tms timestamp NOT NULL,
+ date_valid datetime,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
+ fk_user_valid integer,
import_key varchar(14),
status integer NOT NULL,
fk_product integer,
diff --git a/htdocs/install/mysql/tables/llx_bom_bom.sql b/htdocs/install/mysql/tables/llx_bom_bom.sql
index 2bca889c970..89a2f8e8bab 100644
--- a/htdocs/install/mysql/tables/llx_bom_bom.sql
+++ b/htdocs/install/mysql/tables/llx_bom_bom.sql
@@ -25,8 +25,10 @@ CREATE TABLE llx_bom_bom(
note_private text,
date_creation datetime NOT NULL,
tms timestamp NOT NULL,
+ date_valid datetime,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
+ fk_user_valid integer,
import_key varchar(14),
status integer NOT NULL,
fk_product integer,
diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang
index 524979e610d..fc2cb928903 100644
--- a/htdocs/langs/en_US/accountancy.lang
+++ b/htdocs/langs/en_US/accountancy.lang
@@ -98,7 +98,8 @@ MenuLoanAccounts=Loan accounts
MenuProductsAccounts=Product accounts
MenuClosureAccounts=Closure accounts
ProductsBinding=Products accounts
-Ventilation=Binding to accounts
+TransferInAccounting=Transfer in accounting
+RegistrationInAccounting=Registration in accounting
Binding=Binding to accounts
CustomersVentilation=Customer invoice binding
SuppliersVentilation=Vendor invoice binding
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 6b3568bea31..6fc421e19a4 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1249,6 +1249,7 @@ SupplierPaymentSetup=Vendor payments setup
PropalSetup=Commercial proposals module setup
ProposalsNumberingModules=Commercial proposal numbering models
ProposalsPDFModules=Commercial proposal documents models
+SuggestedPaymentModesIfNotDefinedInProposal=Suggested payments mode on proposal by default if not defined for proposal
FreeLegalTextOnProposal=Free text on commercial proposals
WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty)
BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL=Ask for bank account destination of proposal
diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang
index a38f3d23932..d4cce020d00 100644
--- a/htdocs/langs/en_US/agenda.lang
+++ b/htdocs/langs/en_US/agenda.lang
@@ -126,7 +126,6 @@ AddEvent=Create event
MyAvailability=My availability
ActionType=Event type
DateActionBegin=Start event date
-CloneAction=Clone event
ConfirmCloneEvent=Are you sure you want to clone the event %s ?
RepeatEvent=Repeat event
EveryWeek=Every week
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index 17853434ea9..0934b4c1e46 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -322,7 +322,6 @@ PaymentNumber=Payment number
RemoveDiscount=Remove discount
WatermarkOnDraftBill=Watermark on draft invoices (nothing if empty)
InvoiceNotChecked=No invoice selected
-CloneInvoice=Clone invoice
ConfirmCloneInvoice=Are you sure you want to clone this invoice %s ?
DisabledBecauseReplacedInvoice=Action disabled because invoice has been replaced
DescTaxAndDividendsArea=This area presents a summary of all payments made for special expenses. Only records with payments during the fixed year are included here.
diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang
index c6c3921edea..02feb47ccb9 100644
--- a/htdocs/langs/en_US/compta.lang
+++ b/htdocs/langs/en_US/compta.lang
@@ -232,7 +232,6 @@ ACCOUNTING_ACCOUNT_CUSTOMER=Accounting account used for customer third parties
ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on third party card will be used for Subledger accounting only. This one will be used for General Ledger and as default value of Subledger accounting if dedicated customer accounting account on third party is not defined.
ACCOUNTING_ACCOUNT_SUPPLIER=Accounting account used for vendor third parties
ACCOUNTING_ACCOUNT_SUPPLIER_Desc=The dedicated accounting account defined on third party card will be used for Subledger accounting only. This one will be used for General Ledger and as default value of Subledger accounting if dedicated vendor accounting account on third party is not defined.
-CloneTax=Clone a social/fiscal tax
ConfirmCloneTax=Confirm the clone of a social/fiscal tax
CloneTaxForNextMonth=Clone it for next month
SimpleReport=Simple report
diff --git a/htdocs/langs/en_US/contracts.lang b/htdocs/langs/en_US/contracts.lang
index b4e8d7c96d9..51b73423fb0 100644
--- a/htdocs/langs/en_US/contracts.lang
+++ b/htdocs/langs/en_US/contracts.lang
@@ -85,7 +85,6 @@ NoteListOfYourExpiredServices=This list contains only services of contracts for
StandardContractsTemplate=Standard contracts template
ContactNameAndSignature=For %s, name and signature:
OnlyLinesWithTypeServiceAreUsed=Only lines with type "Service" will be cloned.
-CloneContract=Clone contract
ConfirmCloneContract=Are you sure you want to clone the contract %s ?
LowerDateEndPlannedShort=Lower planned end date of active services
SendContractRef=Contract information __REF__
diff --git a/htdocs/langs/en_US/interventions.lang b/htdocs/langs/en_US/interventions.lang
index 2025fb03181..e7667ef6946 100644
--- a/htdocs/langs/en_US/interventions.lang
+++ b/htdocs/langs/en_US/interventions.lang
@@ -15,7 +15,6 @@ DeleteIntervention=Delete intervention
ValidateIntervention=Validate intervention
ModifyIntervention=Modify intervention
DeleteInterventionLine=Delete intervention line
-CloneIntervention=Clone intervention
ConfirmDeleteIntervention=Are you sure you want to delete this intervention?
ConfirmValidateIntervention=Are you sure you want to validate this intervention under name %s ?
ConfirmModifyIntervention=Are you sure you want to modify this intervention?
diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang
index b055b38268a..b50faffe2fa 100644
--- a/htdocs/langs/en_US/mails.lang
+++ b/htdocs/langs/en_US/mails.lang
@@ -58,7 +58,6 @@ EMailTestSubstitutionReplacedByGenericValues=When using test mode, substitutions
MailingAddFile=Attach this file
NoAttachedFiles=No attached files
BadEMail=Bad value for Email
-CloneEMailing=Clone Emailing
ConfirmCloneEMailing=Are you sure you want to clone this emailing?
CloneContent=Clone message
CloneReceivers=Cloner recipients
diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang
index a8af38d5240..329c4921ca3 100644
--- a/htdocs/langs/en_US/modulebuilder.lang
+++ b/htdocs/langs/en_US/modulebuilder.lang
@@ -40,7 +40,7 @@ PageForAgendaTab=PHP page for event tab
PageForDocumentTab=PHP page for document tab
PageForNoteTab=PHP page for note tab
PathToModulePackage=Path to zip of module/application package
-PathToModuleDocumentation=Path to file of module/application documentation
+PathToModuleDocumentation=Path to file of module/application documentation (%s)
SpaceOrSpecialCharAreNotAllowed=Spaces or special characters are not allowed.
FileNotYetGenerated=File not yet generated
RegenerateClassAndSql=Erase and regenerate class and sql files
@@ -76,7 +76,7 @@ ListOfMenusEntries=List of menu entries
ListOfPermissionsDefined=List of defined permissions
SeeExamples=See examples here
EnabledDesc=Condition to have this field active (Examples: 1 or $conf->global->MYMODULE_MYOPTION)
-VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only. Using a negative value means field is not shown by default on list but can be selected for viewing). It can be an expression, for example: preg_match('/public/', $_SERVER['PHP_SELF'])?0:1
+VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). Using a negative value means field is not shown by default on list but can be selected for viewing). It can be an expression, for example: preg_match('/public/', $_SERVER['PHP_SELF'])?0:1
IsAMeasureDesc=Can the value of field be cumulated to get a total into list? (Examples: 1 or 0)
SearchAllDesc=Is the field used to make a search from the quick search tool? (Examples: 1 or 0)
SpecDefDesc=Enter here all documentation you want to provide with your module that is not already defined by other tabs. You can use .md or better, the rich .asciidoc syntax.
diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang
index 68e84aee8e3..fcfcaba700a 100644
--- a/htdocs/langs/en_US/mrp.lang
+++ b/htdocs/langs/en_US/mrp.lang
@@ -1,8 +1,11 @@
+MenuBOM=Bills of material
+BillOfMaterials=Bill of Material
BOMsSetup=Setup of module BOM
-ListOfBOMs=List of BOMs
-NewBOM=New BOM
+ListOfBOMs=List of bills of material (BOM)
+NewBOM=New bill of material
ProductBOMHelp=Product to create with this BOM
-BOMsNumberingModules=BOMs numbering templates
+BOMsNumberingModules=BOM numbering templates
BOMsModelModule=BOMS document templates
-FreeLegalTextOnBOMs=Free text on document of BOMs
-WatermarkOnDraftBOMs=Watermark on draft BOMs
+FreeLegalTextOnBOMs=Free text on document of BOM
+WatermarkOnDraftBOMs=Watermark on draft BOM
+ConfirmCloneBillOfMaterials=Are you sure you want to clone this bill of material ?
diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang
index 1f53d0c050a..ad895845488 100644
--- a/htdocs/langs/en_US/orders.lang
+++ b/htdocs/langs/en_US/orders.lang
@@ -110,7 +110,6 @@ OrderMode=Order method
AuthorRequest=Request author
UserWithApproveOrderGrant=Users granted with "approve orders" permission.
PaymentOrderRef=Payment of order %s
-CloneOrder=Clone order
ConfirmCloneOrder=Are you sure you want to clone this order %s ?
DispatchSupplierOrder=Receiving purchase order %s
FirstApprovalAlreadyDone=First approval already done
diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index 401ccc5462e..325297b6d1f 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -144,7 +144,6 @@ ListProductByPopularity=List of products by popularity
ListServiceByPopularity=List of services by popularity
Finished=Manufactured product
RowMaterial=Raw Material
-CloneProduct=Clone product or service
ConfirmCloneProduct=Are you sure you want to clone product or service %s ?
CloneContentProduct=Clone all main information of product/service
ClonePricesProduct=Clone prices
diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang
index 8cb78975066..4f395925cdd 100644
--- a/htdocs/langs/en_US/projects.lang
+++ b/htdocs/langs/en_US/projects.lang
@@ -131,7 +131,6 @@ TaskIsNotAssignedToUser=Task not assigned to user. Use button '%s%s tasks at the moment) and all inputs of time spent.
IfNeedToUseOtherObjectKeepEmpty=If some objects (invoice, order, ...), belonging to another third party, must be linked to the project to create, keep this empty to have the project being multi third parties.
-CloneProject=Clone project
CloneTasks=Clone tasks
CloneContacts=Clone contacts
CloneNotes=Clone notes
diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang
index 44da81357ef..7fce5107356 100644
--- a/htdocs/langs/en_US/propal.lang
+++ b/htdocs/langs/en_US/propal.lang
@@ -56,7 +56,6 @@ CopyPropalFrom=Create commercial proposal by copying existing proposal
CreateEmptyPropal=Create empty commercial proposal or from list of products/services
DefaultProposalDurationValidity=Default commercial proposal validity duration (in days)
UseCustomerContactAsPropalRecipientIfExist=Use contact/address with type 'Contact following-up proposal' if defined instead of third party address as proposal recipient address
-ClonePropal=Clone commercial proposal
ConfirmClonePropal=Are you sure you want to clone the commercial proposal %s ?
ConfirmReOpenProp=Are you sure you want to open back the commercial proposal %s ?
ProposalsAndProposalsLines=Commercial proposal and lines
diff --git a/htdocs/langs/en_US/supplier_proposal.lang b/htdocs/langs/en_US/supplier_proposal.lang
index 501b6d907e3..ff738a949a6 100644
--- a/htdocs/langs/en_US/supplier_proposal.lang
+++ b/htdocs/langs/en_US/supplier_proposal.lang
@@ -34,7 +34,6 @@ SupplierProposalStatusSignedShort=Accepted
SupplierProposalStatusNotSignedShort=Refused
CopyAskFrom=Create price request by copying existing a request
CreateEmptyAsk=Create blank request
-CloneAsk=Clone price request
ConfirmCloneAsk=Are you sure you want to clone the price request %s ?
ConfirmReOpenAsk=Are you sure you want to open back the price request %s ?
SendAskByMail=Send price request by mail
diff --git a/htdocs/langs/en_US/trips.lang b/htdocs/langs/en_US/trips.lang
index 3072dae1df6..19710e8915d 100644
--- a/htdocs/langs/en_US/trips.lang
+++ b/htdocs/langs/en_US/trips.lang
@@ -109,7 +109,6 @@ NoTripsToExportCSV=No expense report to export for this period.
ExpenseReportPayment=Expense report payment
ExpenseReportsToApprove=Expense reports to approve
ExpenseReportsToPay=Expense reports to pay
-CloneExpenseReport=Clone expense report
ConfirmCloneExpenseReport=Are you sure you want to clone this expense report ?
ExpenseReportsIk=Expense report milles index
ExpenseReportsRules=Expense report rules
diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang
index 1c0c44406be..c36882a2ad1 100644
--- a/htdocs/langs/fr_FR/main.lang
+++ b/htdocs/langs/fr_FR/main.lang
@@ -269,12 +269,12 @@ DatePayment=Date paiement
DateApprove=Date approbation
DateApprove2=Date approbation (deuxième approbation)
RegistrationDate=Date d'inscription
-UserCreation=Création de l'utilisateur
-UserModification=Modification de l'utilisateur
-UserValidation=Validation de l'utilisateur
-UserCreationShort=Création de l'utilisateur
-UserModificationShort=Modification de l'utilisateur
-UserValidationShort=Utilisateur actif
+UserCreation=Utilisateur de création
+UserModification=Utilisateur de modification
+UserValidation=Utilisateur de validation
+UserCreationShort=Util. de création
+UserModificationShort=Util. de modification
+UserValidationShort=Util. de validation
DurationYear=an
DurationMonth=mois
DurationWeek=semaine
diff --git a/htdocs/modulebuilder/admin/setup.php b/htdocs/modulebuilder/admin/setup.php
index be644a1f2e4..dfe8f681985 100644
--- a/htdocs/modulebuilder/admin/setup.php
+++ b/htdocs/modulebuilder/admin/setup.php
@@ -35,9 +35,12 @@ $backtopage = GETPOST('backtopage', 'alpha');
/*
* Actions
*/
-if ($action=="update"){
- $res1=dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_README', GETPOST('MODULEBUILDER_SPECIFIC_README'), 'chaine', 0, '', $conf->entity);
- if ($res1 < 0) {
+if ($action=="update")
+{
+ $res1=dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_README', GETPOST('MODULEBUILDER_SPECIFIC_README', 'none'), 'chaine', 0, '', $conf->entity);
+ $res2=dolibarr_set_const($db, 'MODULEBUILDER_ASCIIDOCTOR', GETPOST('MODULEBUILDER_ASCIIDOCTOR', 'nohtml'), 'chaine', 0, '', $conf->entity);
+ $res3=dolibarr_set_const($db, 'MODULEBUILDER_ASCIIDOCTORPDF', GETPOST('MODULEBUILDER_ASCIIDOCTORPDF', 'nohtml'), 'chaine', 0, '', $conf->entity);
+ if ($res1 < 0 || $res2 < 0 || $res3 < 0) {
setEventMessages('ErrorFailedToSaveDate', null, 'errors');
$db->rollback();
}
@@ -81,10 +84,7 @@ $form = new Form($db);
llxHeader('', $langs->trans("ModulebuilderSetup"));
-$linkback = '';
-if (GETPOST('withtab', 'alpha')) {
- $linkback = '' . $langs->trans("BackToModuleList") . ' ';
-}
+$linkback = '' . $langs->trans("BackToModuleList") . ' ';
print ' ';
+
print ' ';
print '';
diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php
index e23177dca11..00cb961fc90 100644
--- a/htdocs/modulebuilder/template/class/myobject.class.php
+++ b/htdocs/modulebuilder/template/class/myobject.class.php
@@ -58,11 +58,16 @@ class MyObject extends CommonObject
public $picto = 'myobject@mymodule';
+ const STATUS_DRAFT = 0;
+ const STATUS_VALIDATED = 1;
+ const STATUS_DISABLED = -1;
+
+
/**
- * 'type' if the field format.
+ * 'type' if the field format ('integer', 'integer:Class:pathtoclass', 'varchar(x)', 'double(24,8)', 'text', 'html', 'datetime', 'timestamp', 'float')
* 'label' the translation key.
* 'enabled' is a condition when the field must be managed.
- * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only. Using a negative value means field is not shown by default on list but can be selected for viewing)
+ * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). Using a negative value means field is not shown by default on list but can be selected for viewing)
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'default' is a default value for creation (can still be replaced by the global setup of default values)
* 'index' if we want an index in database.
@@ -82,23 +87,24 @@ class MyObject extends CommonObject
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields=array(
- 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),
- 'ref' =>array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'),
- 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20),
- 'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1, 'css'=>'minwidth200', 'help'=>'Help text', 'showoncombobox'=>1),
- 'amount' =>array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>1, 'visible'=>1, 'default'=>'null', 'position'=>40, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text'),
- 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'help'=>'LinkToThirparty'),
+ 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=> 1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),
+ 'ref' =>array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=> 1, 'default'=>'(PROV)', 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'),
+ 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=> 1, 'default'=>1, 'index'=>1, 'position'=>20),
+ 'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1, 'css'=>'minwidth200', 'help'=>'Help text', 'showoncombobox'=>1),
+ 'amount' =>array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>1, 'visible'=>1, 'default'=>'null', 'position'=>40, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text for amount'),
+ 'qty' =>array('type'=>'real', 'label'=>'Qty', 'enabled'=>1, 'visible'=>1, 'default'=>'0', 'position'=>45, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text for quantity'),
+ 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=> 1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'help'=>'LinkToThirparty'),
'description' =>array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>0, 'position'=>60),
'note_public' =>array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61),
'note_private' =>array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62),
- 'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500),
- 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501),
+ 'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=> 1, 'position'=>500),
+ 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=> 1, 'position'=>501),
//'date_validation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>502),
- 'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510, 'foreignkey'=>'llx_user.rowid'),
+ 'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=> 1, 'position'=>510, 'foreignkey'=>'llx_user.rowid'),
'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511),
//'fk_user_valid' =>array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>512),
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000),
- 'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Canceled')),
+ 'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=> 1, 'default'=>0, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Canceled')),
);
/**
diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php
index de3b2ec8b99..283e0a29749 100644
--- a/htdocs/modulebuilder/template/myobject_card.php
+++ b/htdocs/modulebuilder/template/myobject_card.php
@@ -130,7 +130,7 @@ if (empty($reshook))
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
// Actions when linking object each other
- include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
+ include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
// Actions when printing a doc from card
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
@@ -257,7 +257,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($action == 'clone') {
// Create an array for form
$formquestion = array();
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneMyObject'), $langs->trans('ConfirmCloneMyObject', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneMyObject', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
// Confirmation of action xxxx
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index a310f4258e9..35c60248ccf 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -409,6 +409,7 @@ foreach($object->fields as $key => $val)
$cssforfield='';
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
+ if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
if (! empty($arrayfields['t.'.$key]['checked'])) print ' ';
}
@@ -435,6 +436,7 @@ foreach($object->fields as $key => $val)
$cssforfield='';
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
+ if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
if (! empty($arrayfields['t.'.$key]['checked']))
{
@@ -490,6 +492,8 @@ while ($i < min($num, $limit))
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap';
+ if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right';
+
if (! empty($arrayfields['t.'.$key]['checked']))
{
print '';
- print $object->showOutputField($val, $key, $obj->$key, '');
+ if ($key == 'status') print $object->getLibStatut(5);
+ elseif (in_array($val['type'], array('date','datetime','timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), '');
+ else print $object->showOutputField($val, $key, $obj->$key, '');
print ' ';
if (! $i) $totalarray['nbfield']++;
if (! empty($val['isameasure']))
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 18ea87cb03a..dc286faa36c 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -2000,7 +2000,7 @@ if (($action == 'delete' && (empty($conf->use_javascript_ajax) || ! empty($conf-
if (($action == 'clone' && (empty($conf->use_javascript_ajax) || ! empty($conf->dol_use_jmobile))) // Output when action = clone if jmobile or no js
|| (! empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile))) // Always output when not jmobile nor js
{
- print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CloneProduct'), $langs->trans('ConfirmCloneProduct', $object->ref), 'confirm_clone', $formquestionclone, 'yes', 'action-clone', 260, 600);
+ print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneProduct', $object->ref), 'confirm_clone', $formquestionclone, 'yes', 'action-clone', 260, 600);
}
diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php
index 3070515b020..efe6b261e83 100644
--- a/htdocs/product/class/html.formproduct.class.php
+++ b/htdocs/product/class/html.formproduct.class.php
@@ -337,8 +337,8 @@ class FormProduct
$return .= '' . $langs->trans("Default") . ' ';
foreach ($measuringUnits->records as $lines) {
- $return .= 'code == $default) {
+ $return .= ' id == $default) {
$return .= ' selected';
}
// $return.= '>'.$value.' ';
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 8d446682dfd..f186c1d21da 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -4168,7 +4168,7 @@ class Product extends CommonObject
case 2:
return $this->LibStatut($status, 3, 2).' '.$this->LibStatut($status, 1, 2);
case 3:
- return dolGetStatus($langs->trans('ProductStatusNotOnBatch'), '','',empty($status)?'status5':'status4',3,'dot');
+ return dolGetStatus($langs->trans('ProductStatusNotOnBatch'), '', '', empty($status)?'status5':'status4', 3, 'dot');
case 4:
return $this->LibStatut($status, 3, 2).' '.$this->LibStatut($status, 0, 2);
case 5:
@@ -4213,11 +4213,11 @@ class Product extends CommonObject
if($mode>6){
- return dolGetStatus($langs->trans('Unknown'),'', '', 'status0', 0);
+ return dolGetStatus($langs->trans('Unknown'), '', '', 'status0', 0);
}
else{
return dolGetStatus($labelstatut, $labelstatutShort, '', $statuttrans, $mode);
- }
+ }
}
diff --git a/htdocs/product/dynamic_price/class/price_parser.class.php b/htdocs/product/dynamic_price/class/price_parser.class.php
index 8e8b8e4fcc9..d7c066d01c9 100644
--- a/htdocs/product/dynamic_price/class/price_parser.class.php
+++ b/htdocs/product/dynamic_price/class/price_parser.class.php
@@ -157,10 +157,13 @@ class PriceParser
$extrafields = new ExtraFields($this->db);
$extralabels = $extrafields->fetch_name_optionals_label('product', true);
$product->fetch_optionals();
- foreach ($extrafields->attributes[$product->table_element]['label'] as $key=>$label)
- {
- $values["extrafield_".$key] = $product->array_options['options_'.$key];
- }
+ if (is_array($extrafields->attributes[$product->table_element]['label']))
+ {
+ foreach ($extrafields->attributes[$product->table_element]['label'] as $key=>$label)
+ {
+ $values["extrafield_".$key] = $product->array_options['options_'.$key];
+ }
+ }
//Process any pending updaters
$price_updaters = new PriceGlobalVariableUpdater($this->db);
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index 28a9b283d6d..7e106f387ae 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -662,76 +662,76 @@ if (! empty($arrayfields['s.nom']['checked']))
{
print '';
if (! empty($search_nom_only) && empty($search_nom)) $search_nom=$search_nom_only;
- print ' ';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['s.name_alias']['checked']))
{
print '';
- print ' ';
+ print ' ';
print ' ';
}
// Barcode
if (! empty($arrayfields['s.barcode']['checked']))
{
print '';
- print ' ';
+ print ' ';
print ' ';
}
// Customer code
if (! empty($arrayfields['s.code_client']['checked']))
{
print '';
- print ' ';
+ print ' ';
print ' ';
}
// Supplier code
if (! empty($arrayfields['s.code_fournisseur']['checked']))
{
print '';
- print ' ';
+ print ' ';
print ' ';
}
// Account Customer code
if (! empty($arrayfields['s.code_compta']['checked']))
{
print '';
- print ' ';
+ print ' ';
print ' ';
}
// Account Supplier code
if (! empty($arrayfields['s.code_compta_fournisseur']['checked']))
{
print '';
- print ' ';
+ print ' ';
print ' ';
}
// Town
if (! empty($arrayfields['s.town']['checked']))
{
print '';
- print ' ';
+ print ' ';
print ' ';
}
// Zip
if (! empty($arrayfields['s.zip']['checked']))
{
print '';
- print ' ';
+ print ' ';
print ' ';
}
// State
if (! empty($arrayfields['state.nom']['checked']))
{
print '';
- print ' ';
+ print ' ';
print ' ';
}
// Region
if (! empty($arrayfields['region.nom']['checked']))
{
print '';
- print ' ';
+ print ' ';
print ' ';
}
// Country
@@ -759,77 +759,77 @@ if (! empty($arrayfields['s.email']['checked']))
{
// Email
print '';
- print ' ';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['s.phone']['checked']))
{
// Phone
print '';
- print ' ';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['s.fax']['checked']))
{
// Fax
print '';
- print ' ';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['s.url']['checked']))
{
// Url
print '';
- print ' ';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['s.siren']['checked']))
{
// IdProf1
print '';
- print ' ';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['s.siret']['checked']))
{
// IdProf2
print '';
- print ' ';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['s.ape']['checked']))
{
// IdProf3
print '';
- print ' ';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['s.idprof4']['checked']))
{
// IdProf4
print '';
- print ' ';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['s.idprof5']['checked']))
{
// IdProf5
print '';
- print ' ';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['s.idprof6']['checked']))
{
// IdProf6
print '';
- print ' ';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['s.tva_intra']['checked']))
{
// Vat number
print '';
- print ' ';
+ print ' ';
print ' ';
}
@@ -863,7 +863,7 @@ if (! empty($arrayfields['s.fk_stcomm']['checked']))
if (! empty($arrayfields['s2.nom']['checked']))
{
print '';
- print ' ';
+ print ' ';
print ' ';
}
// Extra fields
diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php
index 933faf3b34a..d5370a7361e 100644
--- a/htdocs/supplier_proposal/card.php
+++ b/htdocs/supplier_proposal/card.php
@@ -1209,8 +1209,8 @@ if ($action == 'create')
print ' ';
print '' . $langs->trans('CommRequest') . ' ' . $objectsrc->getNomUrl(1) . ' ';
- print '' . $langs->trans('TotalHT') . ' ' . price($objectsrc->total_ht) . ' ';
- print '' . $langs->trans('TotalVAT') . ' ' . price($objectsrc->total_tva) . " ";
+ print '' . $langs->trans('AmountHT') . ' ' . price($objectsrc->total_ht) . ' ';
+ print '' . $langs->trans('AmountVAT') . ' ' . price($objectsrc->total_tva) . " ";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0 ) // Localtax1
{
print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ' ' . price($objectsrc->total_localtax1) . " ";
@@ -1220,13 +1220,13 @@ if ($action == 'create')
{
print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ' ' . price($objectsrc->total_localtax2) . " ";
}
- print '' . $langs->trans('TotalTTC') . ' ' . price($objectsrc->total_ttc) . " ";
+ print '' . $langs->trans('AmountTTC') . ' ' . price($objectsrc->total_ttc) . " ";
if (!empty($conf->multicurrency->enabled))
{
- print '' . $langs->trans('MulticurrencyTotalHT') . ' ' . price($objectsrc->multicurrency_total_ht) . ' ';
- print '' . $langs->trans('MulticurrencyTotalVAT') . ' ' . price($objectsrc->multicurrency_total_tva) . " ";
- print '' . $langs->trans('MulticurrencyTotalTTC') . ' ' . price($objectsrc->multicurrency_total_ttc) . " ";
+ print '' . $langs->trans('MulticurrencyAmountHT') . ' ' . price($objectsrc->multicurrency_total_ht) . ' ';
+ print '' . $langs->trans('MulticurrencyAmountVAT') . ' ' . price($objectsrc->multicurrency_total_tva) . " ";
+ print '' . $langs->trans('MulticurrencyAmountTTC') . ' ' . price($objectsrc->multicurrency_total_ttc) . " ";
}
}
@@ -1328,7 +1328,7 @@ if ($action == 'create')
// 1),
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', 's.fournisseur=1')));
// Paiement incomplet. On demande si motif = escompte ou autre
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneAsk'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
// Confirm delete
diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php
index d43c3195b92..ec1474828b9 100644
--- a/htdocs/takepos/receipt.php
+++ b/htdocs/takepos/receipt.php
@@ -3,6 +3,7 @@
* Copyright (C) 2011 Laurent Destailleur
* Copyright (C) 2012 Marcos García
* Copyright (C) 2018 Andreu Bisquerra
+ * Copyright (C) 2019 Josep Lluís Amador
*
* 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
@@ -84,7 +85,9 @@ print $object->ref;
{
?>
- product_label;?>
+ product_label)) echo $line->product_label;
+ else echo $line->description;?>
+
qty;?>
total_ttc/$line->qty;?>
total_ttc);?>
diff --git a/htdocs/theme/eldy/badges.inc.php b/htdocs/theme/eldy/badges.inc.php
index 7384fffed5f..ab4be871d7c 100644
--- a/htdocs/theme/eldy/badges.inc.php
+++ b/htdocs/theme/eldy/badges.inc.php
@@ -25,13 +25,13 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
.badge-pill, .tabs .badge {
padding-right: .6em;
padding-left: .6em;
- border-radius: 10rem;
+ border-radius: 0.25rem;
}
.badge-dot {
padding: 0;
border-radius: 50%;
- padding: 0.6em;
+ padding: 0.25rem;
vertical-align: middle;
}
@@ -39,8 +39,10 @@ a.badge:focus, a.badge:hover {
text-decoration: none;
}
-
-
+.liste_titre .badge {
+ background-color: ;
+ color: #fff;
+}
/* PRIMARY */
@@ -155,7 +157,7 @@ a.badge-dark:focus, a.badge-dark:hover {
background-color: ;
}
-/*
+/*
* STATUS BADGES
*/
@@ -164,32 +166,32 @@ a.badge-dark:focus, a.badge-dark:hover {
';
if ($key == 'fk_statut') print $object->getLibStatut(5);
+ elseif (in_array($val['type'], array('date','datetime','timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), '');
else print $object->showOutputField($val, $key, $obj->$key, '');
print '';
if (! $i) $totalarray['nbfield']++;
diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php
index c53193411ff..278d3656a6f 100644
--- a/htdocs/variants/combinations.php
+++ b/htdocs/variants/combinations.php
@@ -640,22 +640,7 @@ if (! empty($id) || ! empty($ref))
);
}
} elseif ($action === 'copy') {
-
- print $form->formconfirm(
- 'combinations.php?id='.$id,
- $langs->trans('CloneCombinationsProduct'),
- $langs->trans('ConfirmCloneProductCombinations'),
- 'confirm_copycombination',
- array(
- array(
- 'type' => 'text',
- 'label' => $langs->trans('CloneDestinationReference'),
- 'name' => 'dest_product'
- )
- ),
- 0,
- 1
- );
+ print $form->formconfirm('combinations.php?id='.$id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneProductCombinations'), 'confirm_copycombination', array(array('type' => 'text', 'label' => $langs->trans('CloneDestinationReference'), 'name' => 'dest_product')), 0, 1);
}
$comb2val = new ProductCombination2ValuePair($db);