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

This commit is contained in:
florian HENRY 2019-03-14 13:02:09 +01:00
commit 9bcb91a122
63 changed files with 469 additions and 252 deletions

View File

@ -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, ...) 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) - 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)

View File

@ -50,8 +50,8 @@ $type = 'bankaccount';
//Order display of bank account //Order display of bank account
if ($action == 'setbankorder') { if ($action == 'setbankorder') {
if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION", if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity) > 0)
GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity) > 0) { {
header("Location: " . $_SERVER["PHP_SELF"]); header("Location: " . $_SERVER["PHP_SELF"]);
exit; exit;
} }
@ -62,8 +62,8 @@ if ($action == 'setbankorder') {
//Auto report last num releve on conciliate //Auto report last num releve on conciliate
if ($action == 'setreportlastnumreleve') { if ($action == 'setreportlastnumreleve') {
if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 1, 'chaine', 0, if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 1, 'chaine', 0, '', $conf->entity) > 0)
'', $conf->entity) > 0) { {
header("Location: " . $_SERVER["PHP_SELF"]); header("Location: " . $_SERVER["PHP_SELF"]);
exit; exit;
} }
@ -72,8 +72,8 @@ if ($action == 'setreportlastnumreleve') {
} }
} }
elseif ($action == 'unsetreportlastnumreleve') { elseif ($action == 'unsetreportlastnumreleve') {
if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 0, 'chaine', 0, if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 0, 'chaine', 0, '', $conf->entity) > 0)
'', $conf->entity) > 0) { {
header("Location: " . $_SERVER["PHP_SELF"]); header("Location: " . $_SERVER["PHP_SELF"]);
exit; exit;
} }
@ -100,8 +100,7 @@ if ($action == 'specimen') {
$filefound = 0; $filefound = 0;
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
foreach ($dirmodels as $reldir) { foreach ($dirmodels as $reldir) {
$file = dol_buildpath($reldir . "core/modules/bank/doc/pdf_" . $modele . ".modules.php", $file = dol_buildpath($reldir . "core/modules/bank/doc/pdf_" . $modele . ".modules.php", 0);
0);
if (file_exists($file)) { if (file_exists($file)) {
$filefound = 1; $filefound = 1;
$classname = "pdf_" . $modele; $classname = "pdf_" . $modele;
@ -142,8 +141,7 @@ elseif ($action == 'del') {
} }
// Set default model // Set default model
elseif ($action == 'setdoc') { elseif ($action == 'setdoc') {
if (dolibarr_set_const($db, "BANKADDON_PDF", $value, 'chaine', 0, '', if (dolibarr_set_const($db, "BANKADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
$conf->entity)) {
// The constant that was read before the new set // The constant that was read before the new set
// We therefore requires a variable to have a coherent view // We therefore requires a variable to have a coherent view
$conf->global->BANKADDON_PDF = $value; $conf->global->BANKADDON_PDF = $value;
@ -169,8 +167,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
llxHeader("", $langs->trans("BankSetupModule")); llxHeader("", $langs->trans("BankSetupModule"));
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, 'title_setup');
'title_setup');
$head = bank_admin_prepare_head(null); $head = bank_admin_prepare_head(null);
dol_fiche_head($head, 'general', $langs->trans("BankSetupModule"), -1, 'account'); dol_fiche_head($head, 'general', $langs->trans("BankSetupModule"), -1, 'account');
@ -252,7 +249,7 @@ if ($resql) {
while ($i < $num_rows) { while ($i < $num_rows) {
$array = $db->fetch_array($resql); $array = $db->fetch_array($resql);
array_push($def, $array[0]); array_push($def, $array[0]);
$i ++; $i++;
} }
} }
else { else {
@ -285,8 +282,7 @@ foreach ($dirmodels as $reldir) {
arsort($filelist); arsort($filelist);
foreach ($filelist as $file) { foreach ($filelist as $file) {
if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
$file)) {
if (file_exists($dir . '/' . $file)) { if (file_exists($dir . '/' . $file)) {
$name = substr($file, 4, dol_strlen($file) - 16); $name = substr($file, 4, dol_strlen($file) - 16);
@ -296,11 +292,9 @@ foreach ($dirmodels as $reldir) {
$module = new $classname($db); $module = new $classname($db);
$modulequalified = 1; $modulequalified = 1;
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2)
< 2)
$modulequalified = 0; $modulequalified = 0;
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1)
< 1)
$modulequalified = 0; $modulequalified = 0;
if ($modulequalified) { if ($modulequalified) {
@ -317,27 +311,23 @@ foreach ($dirmodels as $reldir) {
if (in_array($name, $def)) { if (in_array($name, $def)) {
print '<td class="center">' . "\n"; print '<td class="center">' . "\n";
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=del&value=' . $name . '">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?action=del&value=' . $name . '">';
print img_picto($langs->trans("Enabled"), print img_picto($langs->trans("Enabled"), 'switch_on');
'switch_on');
print '</a>'; print '</a>';
print '</td>'; print '</td>';
} }
else { else {
print '<td class="center">' . "\n"; print '<td class="center">' . "\n";
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&value=' . $name . '&amp;scan_dir=' . $module->scandir . '&amp;label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"), print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&value=' . $name . '&amp;scan_dir=' . $module->scandir . '&amp;label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
'switch_off') . '</a>';
print "</td>"; print "</td>";
} }
// Default // Default
print '<td class="center">'; print '<td class="center">';
if ($conf->global->BANKADDON_PDF == $name) { if ($conf->global->BANKADDON_PDF == $name) {
print img_picto($langs->trans("Default"), print img_picto($langs->trans("Default"), 'on');
'on');
} }
else { else {
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setdoc&value=' . $name . '&amp;scan_dir=' . $module->scandir . '&amp;label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setdoc&value=' . $name . '&amp;scan_dir=' . $module->scandir . '&amp;label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
'off') . '</a>';
} }
print '</td>'; print '</td>';
@ -348,30 +338,25 @@ foreach ($dirmodels as $reldir) {
$htmltooltip .= '<br>' . $langs->trans("Width") . '/' . $langs->trans("Height") . ': ' . $module->page_largeur . '/' . $module->page_hauteur; $htmltooltip .= '<br>' . $langs->trans("Width") . '/' . $langs->trans("Height") . ': ' . $module->page_largeur . '/' . $module->page_hauteur;
} }
$htmltooltip .= '<br><br><u>' . $langs->trans("FeaturesSupported") . ':</u>'; $htmltooltip .= '<br><br><u>' . $langs->trans("FeaturesSupported") . ':</u>';
$htmltooltip .= '<br>' . $langs->trans("Logo") . ': ' . yn($module->option_logo, $htmltooltip .= '<br>' . $langs->trans("Logo") . ': ' . yn($module->option_logo, 1, 1);
1, 1);
//$htmltooltip .= '<br>' . $langs->trans("PaymentMode") . ': ' . yn($module->option_modereg, 1, 1); //$htmltooltip .= '<br>' . $langs->trans("PaymentMode") . ': ' . yn($module->option_modereg, 1, 1);
//$htmltooltip .= '<br>' . $langs->trans("PaymentConditions") . ': ' . yn($module->option_condreg, 1, 1); //$htmltooltip .= '<br>' . $langs->trans("PaymentConditions") . ': ' . yn($module->option_condreg, 1, 1);
$htmltooltip .= '<br>' . $langs->trans("MultiLanguage") . ': ' . yn($module->option_multilang, $htmltooltip .= '<br>' . $langs->trans("MultiLanguage") . ': ' . yn($module->option_multilang, 1, 1);
1, 1);
// $htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1); // $htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
// $htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1); // $htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
//$htmltooltip .= '<br>' . $langs->trans("WatermarkOnDraftOrders") . ': ' . yn($module->option_draft_watermark, 1, 1); //$htmltooltip .= '<br>' . $langs->trans("WatermarkOnDraftOrders") . ': ' . yn($module->option_draft_watermark, 1, 1);
print '<td class="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, print $form->textwithpicto('', $htmltooltip, 1, 0);
0);
print '</td>'; print '</td>';
// Preview // Preview
print '<td class="center">'; print '<td class="center">';
if ($module->type == 'pdf') { if ($module->type == 'pdf') {
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=specimen&module=' . $name . '">' . img_object($langs->trans("Preview"), print '<a href="' . $_SERVER["PHP_SELF"] . '?action=specimen&module=' . $name . '">' . img_object($langs->trans("Preview"), 'bill') . '</a>';
'bill') . '</a>';
} }
else { else {
print img_object($langs->trans("PreviewNotAvailable"), print img_object($langs->trans("PreviewNotAvailable"), 'generic');
'generic');
} }
print '</td>'; print '</td>';
@ -423,8 +408,7 @@ if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) {
else else
{ {
print '<td class="center">' . "\n"; print '<td class="center">' . "\n";
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"), print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
'switch_off') . '</a>';
print "</td>"; print "</td>";
} }

View File

@ -307,7 +307,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($action == 'clone') { if ($action == 'clone') {
// Create an array for form // Create an array for form
$formquestion = array(); $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 // Confirmation of action process

View File

@ -155,7 +155,7 @@ print '<input type="hidden" name="action" value="update">';
dol_fiche_head($head, 'handler', $langs->trans("Menus"), -1); dol_fiche_head($head, 'handler', $langs->trans("Menus"), -1);
print $langs->trans("MenusDesc")."<br>\n"; print '<span class="opacitymedium">'.$langs->trans("MenusDesc")."</span><br>\n";
print "<br>\n"; print "<br>\n";

View File

@ -237,7 +237,7 @@ $h++;
dol_fiche_head($head, 'editor', $langs->trans("Menus"), -1); dol_fiche_head($head, 'editor', $langs->trans("Menus"), -1);
print $langs->trans("MenusEditorDesc")."<br>\n"; print '<span class="opacitymedium">'.$langs->trans("MenusEditorDesc")."</span><br>\n";
print "<br>\n"; print "<br>\n";

View File

@ -72,8 +72,6 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
/* /*
* Actions * Actions
*
* Put here all code to do according to value of "action" parameter
*/ */
$parameters=array(); $parameters=array();
@ -91,20 +89,20 @@ if (empty($reshook))
if (empty($id)) $backtopage = $backurlforlist; if (empty($id)) $backtopage = $backurlforlist;
else $backtopage = DOL_URL_ROOT.'/bom/bom_card.php?id='.$id; 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 // Actions cancel, add, update, delete or clone
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
// Actions when linking object each other // 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 // Actions when printing a doc from card
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
// Actions to send emails // Actions to send emails
$trigger_name='BILLOFMATERIALS_SENTBYMAIL'; $trigger_name='BOM_SENTBYMAIL';
$autocopy='MAIN_MAIL_AUTOCOPY_BILLOFMATERIALS_TO'; $autocopy='MAIN_MAIL_AUTOCOPY_BOM_TO';
$trackid='bom'.$object->id; $trackid='bom'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; 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(); $res = $object->fetch_optionals();
$head = bomPrepareHead($object); $head = bomPrepareHead($object);
dol_fiche_head($head, 'card', $langs->trans("NewBOM"), -1, 'bom'); dol_fiche_head($head, 'card', $langs->trans("BillOfMaterials"), -1, 'bom');
$formconfirm = ''; $formconfirm = '';
@ -224,7 +222,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($action == 'clone') { if ($action == 'clone') {
// Create an array for form // Create an array for form
$formquestion = array(); $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 // Confirmation of action xxxx

View File

@ -375,6 +375,7 @@ foreach($object->fields as $key => $val)
$cssforfield=''; $cssforfield='';
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; 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('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 ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
if (! empty($arrayfields['t.'.$key]['checked'])) print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>'; if (! empty($arrayfields['t.'.$key]['checked'])) print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>';
} }
@ -401,6 +402,7 @@ foreach($object->fields as $key => $val)
$cssforfield=''; $cssforfield='';
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; 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('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 ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
if (! empty($arrayfields['t.'.$key]['checked'])) if (! empty($arrayfields['t.'.$key]['checked']))
{ {
@ -452,9 +454,9 @@ while ($i < min($num, $limit))
$cssforfield=''; $cssforfield='';
if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
elseif ($key == 'ref') $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'])) if (! empty($arrayfields['t.'.$key]['checked']))
{ {
@ -465,7 +467,9 @@ while ($i < min($num, $limit))
print $val['css']; print $val['css'];
if ($cssforfield || $val['css']) print '"'; if ($cssforfield || $val['css']) print '"';
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 '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
if (! empty($val['isameasure'])) if (! empty($val['isameasure']))

View File

@ -60,11 +60,16 @@ class BOM extends CommonObject
public $table_element_line = 'bom_bomline'; public $table_element_line = 'bom_bomline';
const STATUS_DRAFT = 0;
const STATUS_VALIDATED = 1;
const STATUS_DISABLED = -1;
/** /**
* 'type' if the field format. * 'type' if the field format.
* 'label' the translation key. * 'label' the translation key.
* 'enabled' is a condition when the field must be managed. * '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). * '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) * '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. * 'index' if we want an index in database.
@ -85,18 +90,20 @@ class BOM extends CommonObject
*/ */
public $fields=array( public $fields=array(
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",), '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',), '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,), '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_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,), '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,), '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,), '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,), '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'), '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')), '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; public $rowid;
@ -116,7 +123,6 @@ class BOM extends CommonObject
// END MODULEBUILDER PROPERTIES // END MODULEBUILDER PROPERTIES
// If this object has a subtable with lines // 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 * @return int <0 if KO, 0 if not found, >0 if OK
*/ */
/*public function fetchLines() public function fetchLines()
{ {
$this->lines=array(); $this->lines=array();
// Load lines with object BillOfMaterialsLine // Load lines with object BOMLine
return count($this->lines)?1:0; return count($this->lines)?1:0;
}*/ }
/** /**
* Load list of objects in memory from the database. * Load list of objects in memory from the database.
@ -390,6 +396,189 @@ class BOM extends CommonObject
//return $this->deleteCommon($user, $notrigger, 1); //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) * 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 * @var string ID to identify managed object
@ -853,24 +1042,10 @@ class BillOfMaterialsLine extends CommonObject
public function fetch($id, $ref = null) public function fetch($id, $ref = null)
{ {
$result = $this->fetchCommon($id, $ref); $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; 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. * Load list of objects in memory from the database.
* *

View File

@ -1391,7 +1391,7 @@ if ($id > 0)
// Clone event // Clone event
if($action == 'clone') 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; print $formconfirm;
} }

View File

@ -691,11 +691,11 @@ if ($resql)
// Date creation // Date creation
if (! empty($arrayfields['a.datec']['checked'])) { if (! empty($arrayfields['a.datec']['checked'])) {
// Status/Percent // Status/Percent
print '<td align="center" class="nowrap">'.dol_print_date($obj->datec, 'dayhour').'</td>'; print '<td align="center" class="nowrap">'.dol_print_date($db->jdate($obj->datec), 'dayhour').'</td>';
} }
// Date update // Date update
if (! empty($arrayfields['a.tms']['checked'])) { if (! empty($arrayfields['a.tms']['checked'])) {
print '<td align="center" class="nowrap">'.dol_print_date($obj->datem, 'dayhour').'</td>'; print '<td align="center" class="nowrap">'.dol_print_date($db->jdate($obj->datem), 'dayhour').'</td>';
} }
if (! empty($arrayfields['a.percent']['checked'])) { if (! empty($arrayfields['a.percent']['checked'])) {
// Status/Percent // Status/Percent

View File

@ -961,7 +961,7 @@ else
array('type' => 'checkbox', 'name' => 'clone_receivers', 'label' => $langs->trans("CloneReceivers"), 'value' => 0) array('type' => 'checkbox', 'name' => 'clone_receivers', 'label' => $langs->trans("CloneReceivers"), 'value' => 0)
); );
// Paiement incomplet. On demande si motif = escompte ou autre // 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);
} }
/* /*

View File

@ -1764,8 +1764,8 @@ if ($action == 'create')
$newclassname = 'Intervention'; $newclassname = 'Intervention';
print '<tr><td>' . $langs->trans($newclassname) . '</td><td>' . $objectsrc->getNomUrl(1) . '</td></tr>'; print '<tr><td>' . $langs->trans($newclassname) . '</td><td>' . $objectsrc->getNomUrl(1) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td>' . price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . '</td></tr>'; print '<tr><td>' . $langs->trans('AmountHT') . '</td><td>' . price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td>' . price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>"; print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td>' . price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0 ) // Localtax1 if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0 ) // Localtax1
{ {
print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>"; print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>";
@ -1775,7 +1775,14 @@ if ($action == 'create')
{ {
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>"; print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>";
} }
print '<tr><td>' . $langs->trans('TotalTTC') . '</td><td>' . price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>"; print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td>' . price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>";
if (!empty($conf->multicurrency->enabled))
{
print '<tr><td>' . $langs->trans('MulticurrencyAmountHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('MulticurrencyAmountVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>";
print '<tr><td>' . $langs->trans('MulticurrencyAmountTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>";
}
} }
print "</table>\n"; print "</table>\n";
@ -1880,7 +1887,7 @@ if ($action == 'create')
$formquestion[] = array('type' => 'date','name' => 'date_delivery','label' => $langs->trans("DeliveryDate"),'value' => $object->date_livraison); $formquestion[] = array('type' => 'date','name' => 'date_delivery','label' => $langs->trans("DeliveryDate"),'value' => $object->date_livraison);
} }
// Paiement incomplet. On demande si motif = escompte ou autre // 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') if ($action == 'statut')

View File

@ -1836,8 +1836,8 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<tr><td>' . $langs->trans($newclassname) . '</td><td>' . $objectsrc->getNomUrl(1) . '</td></tr>'; print '<tr><td>' . $langs->trans($newclassname) . '</td><td>' . $objectsrc->getNomUrl(1) . '</td></tr>';
// Amount // Amount
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td>' . price($objectsrc->total_ht) . '</td></tr>'; print '<tr><td>' . $langs->trans('AmountHT') . '</td><td>' . price($objectsrc->total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td>' . price($objectsrc->total_tva) . "</td></tr>"; print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td>' . price($objectsrc->total_tva) . "</td></tr>";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE
{ {
print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax1) . "</td></tr>"; print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax1) . "</td></tr>";
@ -1848,13 +1848,13 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax2) . "</td></tr>"; print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax2) . "</td></tr>";
} }
print '<tr><td>' . $langs->trans('TotalTTC') . '</td><td>' . price($objectsrc->total_ttc) . "</td></tr>"; print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td>' . price($objectsrc->total_ttc) . "</td></tr>";
if (!empty($conf->multicurrency->enabled)) if (!empty($conf->multicurrency->enabled))
{ {
print '<tr><td>' . $langs->trans('MulticurrencyTotalHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>'; print '<tr><td>' . $langs->trans('MulticurrencyAmountHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('MulticurrencyTotalVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>"; print '<tr><td>' . $langs->trans('MulticurrencyAmountVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>";
print '<tr><td>' . $langs->trans('MulticurrencyTotalTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>"; print '<tr><td>' . $langs->trans('MulticurrencyAmountTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>";
} }
} }
@ -2047,7 +2047,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value'
// => 1), // => 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)'))); 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 // Call Hook formConfirm

View File

@ -3245,8 +3245,8 @@ if ($action == 'create')
echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['facture'])->getNomUrl(1).')'; echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['facture'])->getNomUrl(1).')';
} }
echo '</td></tr>'; echo '</td></tr>';
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td colspan="2">' . price($objectsrc->total_ht) . '</td></tr>'; print '<tr><td>' . $langs->trans('AmountHT') . '</td><td colspan="2">' . price($objectsrc->total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva) . "</td></tr>"; print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva) . "</td></tr>";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1
{ {
print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax1) . "</td></tr>"; print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax1) . "</td></tr>";
@ -3256,7 +3256,7 @@ if ($action == 'create')
{ {
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax2) . "</td></tr>"; print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax2) . "</td></tr>";
} }
print '<tr><td>' . $langs->trans('TotalTTC') . '</td><td colspan="2">' . price($objectsrc->total_ttc) . "</td></tr>"; print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td colspan="2">' . price($objectsrc->total_ttc) . "</td></tr>";
if (!empty($conf->multicurrency->enabled)) 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' => '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))); 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 // 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 // Call Hook formConfirm

View File

@ -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 // Confirmation de la suppression de la charge

View File

@ -1364,7 +1364,7 @@ else
} elseif ($action == 'clone') { } elseif ($action == 'clone') {
// Clone confirmation // 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)'))); $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);
} }

View File

@ -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 if (! empty($object->fields[$key]['foreignkey']) && $value == '-1') $value=''; // This is an explicit foreign key field
$object->$key=$value; $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'])) if ($val['notnull'] > 0 && $object->$key == '' && is_null($val['default']))
{ {
$error++; $error++;
@ -75,7 +79,7 @@ if ($action == 'add' && ! empty($permissiontoadd))
$result=$object->create($user); $result=$object->create($user);
if ($result > 0) if ($result > 0)
{ {
// Creation OK // Creation OK
$urltogo=$backtopage?str_replace('__ID__', $result, $backtopage):$backurlforlist; $urltogo=$backtopage?str_replace('__ID__', $result, $backtopage):$backurlforlist;
header("Location: ".$urltogo); header("Location: ".$urltogo);
exit; exit;

View File

@ -7222,6 +7222,21 @@ abstract class CommonObject
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element); $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 // Create extrafields
if (! $error) if (! $error)
{ {

View File

@ -459,7 +459,7 @@ class Notify
$dir_output = $conf->fournisseur->commande->dir_output; $dir_output = $conf->fournisseur->commande->dir_output;
$object_type = 'order_supplier'; $object_type = 'order_supplier';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n"; $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"; $mesg.= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n";
break; break;
case 'ORDER_SUPPLIER_APPROVE': case 'ORDER_SUPPLIER_APPROVE':
@ -467,7 +467,7 @@ class Notify
$dir_output = $conf->fournisseur->commande->dir_output; $dir_output = $conf->fournisseur->commande->dir_output;
$object_type = 'order_supplier'; $object_type = 'order_supplier';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n"; $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"; $mesg.= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n";
break; break;
case 'ORDER_SUPPLIER_REFUSE': case 'ORDER_SUPPLIER_REFUSE':
@ -475,7 +475,7 @@ class Notify
$dir_output = $conf->fournisseur->commande->dir_output; $dir_output = $conf->fournisseur->commande->dir_output;
$object_type = 'order_supplier'; $object_type = 'order_supplier';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n"; $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"; $mesg.= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n";
break; break;
case 'SHIPPING_VALIDATE': case 'SHIPPING_VALIDATE':

View File

@ -944,7 +944,7 @@ class Translate
* If mb_convert_encoding is not available, return currency code. * If mb_convert_encoding is not available, return currency code.
* *
* @param string $currency_code 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 * @return string Currency symbol encoded into UTF8
*/ */
public function getCurrencySymbol($currency_code, $forceloadall = 0) public function getCurrencySymbol($currency_code, $forceloadall = 0)

View File

@ -705,9 +705,8 @@ class Utils
$result = ($resarray['result'] == 0) ? 1 : 0; $result = ($resarray['result'] == 0) ? 1 : 0;
// Build PDF doc // Build PDF doc
$command=$conf->global->MODULEBUILDER_ASCIIDOCTORPDF.' '.$destfile.' -n -o '.$dirofmoduledoc.'/'.$FILENAMEDOC; $command=$conf->global->MODULEBUILDER_ASCIIDOCTORPDF.' '.$destfile.' -n -o '.$dirofmoduledoc.'/'.$FILENAMEDOCPDF;
$outfile=$dirofmoduletmp.'/outpdf.tmp'; $outfile=$dirofmoduletmp.'/outpdf.tmp';
$resarray = $utils->executeCLI($command, $outfile); $resarray = $utils->executeCLI($command, $outfile);
if ($resarray['result'] != '0') if ($resarray['result'] != '0')
{ {

View File

@ -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) 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 || 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. // TODO Remove this. This part of code should not be used.
// 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); 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' // Date has format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' or 'YYYYMMDDHHMMSS'
$syear = (! empty($reg[1]) ? $reg[1] : ''); $syear = (! empty($reg[1]) ? $reg[1] : '');
$smonth = (! empty($reg[2]) ? $reg[2] : ''); $smonth = (! empty($reg[2]) ? $reg[2] : '');
@ -2979,7 +2979,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
//if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on'))) //if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
if (empty($srconly) && in_array($pictowithoutext, array( 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', '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', 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow', '1leftarrow', '1rightarrow',
'jabber','skype','twitter','facebook','linkedin' 'jabber','skype','twitter','facebook','linkedin'
) )
@ -3005,10 +3005,20 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
} }
elseif ($pictowithoutext == 'off') { elseif ($pictowithoutext == 'off') {
$fakey = 'fa-square-o'; $fakey = 'fa-square-o';
if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5))
{
$fakey = 'fa-square';
$fa='far';
}
$fasize = '1.3em'; $fasize = '1.3em';
} }
elseif ($pictowithoutext == 'on') { elseif ($pictowithoutext == 'on') {
$fakey = 'fa-check-square-o'; $fakey = 'fa-check-square-o';
if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5))
{
$fakey = 'fa-check-square';
$fa='far';
}
$fasize = '1.3em'; $fasize = '1.3em';
} }
elseif ($pictowithoutext == 'bank') { elseif ($pictowithoutext == 'bank') {
@ -3050,6 +3060,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
} }
elseif ($pictowithoutext == 'note') { elseif ($pictowithoutext == 'note') {
$fakey = 'fa-sticky-note-o'; $fakey = 'fa-sticky-note-o';
if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5))
{
$fakey = 'fa-sticky-note'; $fa = 'far';
}
$facolor = '#999'; $facolor = '#999';
$marginleftonlyshort=1; $marginleftonlyshort=1;
} }
@ -4381,7 +4395,7 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
{ {
if ($currency_code == 'auto') $currency_code=$conf->currency; 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'); $listoflanguagesbefore=array('nl_NL');
if (in_array($currency_code, $listofcurrenciesbefore) || in_array($outlangs->defaultlang, $listoflanguagesbefore)) if (in_array($currency_code, $listofcurrenciesbefore) || in_array($outlangs->defaultlang, $listoflanguagesbefore))
{ {

View File

@ -1587,7 +1587,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); $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->rights->expedition->lire);
} }
// Receptions // Receptions
if (! empty($conf->reception->enabled)) if (! empty($conf->reception->enabled))
{ {
$langs->load("receptions"); $langs->load("receptions");
@ -1611,7 +1611,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
{ {
$langs->load("mrp"); $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&amp;action=create", $langs->trans("NewBOM"), 1, $user->rights->bom->write); $newmenu->add("/bom/bom_card.php?leftmenu=bom&amp;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); $newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->rights->bom->read);
} }

View File

@ -38,7 +38,7 @@ $object->fields = dol_sort_array($object->fields, 'position');
foreach($object->fields as $key => $val) foreach($object->fields as $key => $val)
{ {
// Discard if extrafield is a hidden field on form // 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 (array_key_exists('enabled', $val) && isset($val['enabled']) && ! verifCond($val['enabled'])) continue; // We don't want this field

View File

@ -40,7 +40,7 @@ $object->fields = dol_sort_array($object->fields, 'position');
foreach($object->fields as $key => $val) foreach($object->fields as $key => $val)
{ {
// Discard if extrafield is a hidden field on form // 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 (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 if (in_array($key, array('ref','status'))) continue; // Ref and status are already in dol_banner

View File

@ -448,6 +448,8 @@ class ActionsDatapolicy
} }
} }
echo $jsscript; $this->resprint = $jsscript;
return 0;
} }
} }

View File

@ -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)) 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 // 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') if ($action == 'save')

View File

@ -1013,8 +1013,8 @@ if ($action == 'create')
// Amount // Amount
/* Hide amount because we only copy services so amount may differ than source /* Hide amount because we only copy services so amount may differ than source
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td>' . price($objectsrc->total_ht) . '</td></tr>'; print '<tr><td>' . $langs->trans('AmountHT') . '</td><td>' . price($objectsrc->total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td>' . price($objectsrc->total_tva) . "</td></tr>"; print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td>' . price($objectsrc->total_tva) . "</td></tr>";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE
{ {
print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax1) . "</td></tr>"; print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax1) . "</td></tr>";
@ -1025,13 +1025,13 @@ if ($action == 'create')
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax2) . "</td></tr>"; print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax2) . "</td></tr>";
} }
print '<tr><td>' . $langs->trans('TotalTTC') . '</td><td>' . price($objectsrc->total_ttc) . "</td></tr>"; print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td>' . price($objectsrc->total_ttc) . "</td></tr>";
if (!empty($conf->multicurrency->enabled)) if (!empty($conf->multicurrency->enabled))
{ {
print '<tr><td>' . $langs->trans('MulticurrencyTotalHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>'; print '<tr><td>' . $langs->trans('MulticurrencyAmountHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('MulticurrencyTotalVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>"; print '<tr><td>' . $langs->trans('MulticurrencyAmountVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>";
print '<tr><td>' . $langs->trans('MulticurrencyTotalTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>"; print '<tr><td>' . $langs->trans('MulticurrencyAmountTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>";
} }
*/ */
} }
@ -1170,7 +1170,7 @@ elseif ($id > 0 || ! empty($ref))
// => 1), // => 1),
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '', '', 0, 0, null, 0, 'minwidth200'))); 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 // 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) if (!$formconfirm)

View File

@ -1611,8 +1611,8 @@ if ($action=='create')
$newclassname = $classname; $newclassname = $classname;
print '<tr><td>' . $langs->trans($newclassname) . '</td><td colspan="2">' . $objectsrc->getNomUrl(1) . '</td></tr>'; print '<tr><td>' . $langs->trans($newclassname) . '</td><td colspan="2">' . $objectsrc->getNomUrl(1) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td colspan="2">' . price($objectsrc->total_ht) . '</td></tr>'; print '<tr><td>' . $langs->trans('AmountHT') . '</td><td colspan="2">' . price($objectsrc->total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva) . "</td></tr>"; print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva) . "</td></tr>";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE
{ {
print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax1) . "</td></tr>"; print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax1) . "</td></tr>";
@ -1623,13 +1623,13 @@ if ($action=='create')
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax2) . "</td></tr>"; print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax2) . "</td></tr>";
} }
print '<tr><td>' . $langs->trans('TotalTTC') . '</td><td colspan="2">' . price($objectsrc->total_ttc) . "</td></tr>"; print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td colspan="2">' . price($objectsrc->total_ttc) . "</td></tr>";
if (!empty($conf->multicurrency->enabled)) if (!empty($conf->multicurrency->enabled))
{ {
print '<tr><td>' . $langs->trans('MulticurrencyTotalHT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ht) . '</td></tr>'; print '<tr><td>' . $langs->trans('MulticurrencyAmountHT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('MulticurrencyTotalVAT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_tva) . '</td></tr>'; print '<tr><td>' . $langs->trans('MulticurrencyAmountVAT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_tva) . '</td></tr>';
print '<tr><td>' . $langs->trans('MulticurrencyTotalTTC') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ttc) . '</td></tr>'; print '<tr><td>' . $langs->trans('MulticurrencyAmountTTC') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ttc) . '</td></tr>';
} }
} }
@ -1705,7 +1705,7 @@ elseif (! empty($object->id))
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1) //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1)
); );
// Paiement incomplet. On demande si motif = escompte ou autre // 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 // Confirmation de la validation

View File

@ -2093,8 +2093,8 @@ if ($action == 'create')
echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['invoice_supplier'])->getNomUrl(1).')'; echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['invoice_supplier'])->getNomUrl(1).')';
} }
echo '</td></tr>'; echo '</td></tr>';
print '<tr><td>'.$langs->trans('TotalHT').'</td><td>'.price($objectsrc->total_ht).'</td></tr>'; print '<tr><td>'.$langs->trans('AmountHT').'</td><td>'.price($objectsrc->total_ht).'</td></tr>';
print '<tr><td>'.$langs->trans('TotalVAT').'</td><td>'.price($objectsrc->total_tva)."</td></tr>"; print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($objectsrc->total_tva)."</td></tr>";
if ($mysoc->localtax1_assuj=="1" || $object->total_localtax1 != 0) //Localtax1 if ($mysoc->localtax1_assuj=="1" || $object->total_localtax1 != 0) //Localtax1
{ {
print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax1)."</td></tr>"; print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax1)."</td></tr>";
@ -2104,13 +2104,13 @@ if ($action == 'create')
{ {
print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax2)."</td></tr>"; print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax2)."</td></tr>";
} }
print '<tr><td>'.$langs->trans('TotalTTC').'</td><td>'.price($objectsrc->total_ttc)."</td></tr>"; print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($objectsrc->total_ttc)."</td></tr>";
if (!empty($conf->multicurrency->enabled)) if (!empty($conf->multicurrency->enabled))
{ {
print '<tr><td>' . $langs->trans('MulticurrencyTotalHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>'; print '<tr><td>' . $langs->trans('MulticurrencyAmountHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('MulticurrencyTotalVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>"; print '<tr><td>' . $langs->trans('MulticurrencyAmountVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>";
print '<tr><td>' . $langs->trans('MulticurrencyTotalTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>"; print '<tr><td>' . $langs->trans('MulticurrencyAmountTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>";
} }
} }
@ -2232,7 +2232,7 @@ else
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
); );
// Paiement incomplet. On demande si motif = escompte ou autre // 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 // Confirmation de la validation

View File

@ -226,8 +226,8 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read)
$starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning'; $starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning';
$endhalfday=($obj->halfday == 1 || $obj->halfday == 2)?'morning':'afternoon'; $endhalfday=($obj->halfday == 1 || $obj->halfday == 2)?'morning':'afternoon';
print '<td>'.dol_print_date($obj->date_start, 'day').' '.$langs->trans($listhalfday[$starthalfday]); print '<td>'.dol_print_date($db->jdate($obj->date_start), 'day').' '.$langs->trans($listhalfday[$starthalfday]);
print '<td>'.dol_print_date($obj->date_end, 'day').' '.$langs->trans($listhalfday[$endhalfday]); print '<td>'.dol_print_date($db->jdate($obj->date_end), 'day').' '.$langs->trans($listhalfday[$endhalfday]);
print '<td class="right">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>'; print '<td class="right">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>';
print '<td>'.$holidaystatic->LibStatut($obj->status, 3).'</td>'; print '<td>'.$holidaystatic->LibStatut($obj->status, 3).'</td>';
print '</tr>'; print '</tr>';

View File

@ -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; -- 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 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 (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 (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); -- VPGSQL8.2 INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi','',0);

View File

@ -666,11 +666,11 @@ ALTER TABLE llx_actioncomm DROP INDEX idx_actioncomm_datea;
ALTER TABLE llx_actioncomm DROP COLUMN datea2; ALTER TABLE llx_actioncomm DROP COLUMN datea2;
-- Email tracking -- Email tracking
ALTER TABLE llx_actioncomm ADD COLUMN email_msgid varchar(256); ALTER TABLE llx_actioncomm ADD COLUMN email_msgid varchar(255);
ALTER TABLE llx_actioncomm ADD COLUMN email_from varchar(256); ALTER TABLE llx_actioncomm ADD COLUMN email_from varchar(255);
ALTER TABLE llx_actioncomm ADD COLUMN email_sender varchar(256); ALTER TABLE llx_actioncomm ADD COLUMN email_sender varchar(255);
ALTER TABLE llx_actioncomm ADD COLUMN email_to varchar(256); ALTER TABLE llx_actioncomm ADD COLUMN email_to varchar(255);
ALTER TABLE llx_actioncomm ADD COLUMN errors_to varchar(256); ALTER TABLE llx_actioncomm ADD COLUMN errors_to varchar(255);
-- Recurring events -- Recurring events
ALTER TABLE llx_actioncomm ADD COLUMN recurid varchar(128); ALTER TABLE llx_actioncomm ADD COLUMN recurid varchar(128);

View File

@ -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 = ''; 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_subject varchar(255) after email_msgid;
ALTER TABLE llx_actioncomm ADD COLUMN email_tocc varchar(256) after email_to; ALTER TABLE llx_actioncomm ADD COLUMN email_tocc varchar(255) after email_to;
ALTER TABLE llx_actioncomm ADD COLUMN email_tobcc varchar(256) after email_tocc; ALTER TABLE llx_actioncomm ADD COLUMN email_tobcc varchar(255) after email_tocc;
ALTER TABLE llx_user MODIFY COLUMN pass varchar(128); ALTER TABLE llx_user MODIFY COLUMN pass varchar(128);

View File

@ -48,6 +48,9 @@ create table llx_facture_rec_extrafields
import_key varchar(14) import_key varchar(14)
) ENGINE=innodb; ) 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 -- For 9.0
ALTER TABLE llx_extrafields ADD COLUMN help text NULL; ALTER TABLE llx_extrafields ADD COLUMN help text NULL;

View File

@ -186,8 +186,10 @@ CREATE TABLE llx_bom_bom(
note_private text, note_private text,
date_creation datetime NOT NULL, date_creation datetime NOT NULL,
tms timestamp NOT NULL, tms timestamp NOT NULL,
date_valid datetime,
fk_user_creat integer NOT NULL, fk_user_creat integer NOT NULL,
fk_user_modif integer, fk_user_modif integer,
fk_user_valid integer,
import_key varchar(14), import_key varchar(14),
status integer NOT NULL, status integer NOT NULL,
fk_product integer, fk_product integer,

View File

@ -25,8 +25,10 @@ CREATE TABLE llx_bom_bom(
note_private text, note_private text,
date_creation datetime NOT NULL, date_creation datetime NOT NULL,
tms timestamp NOT NULL, tms timestamp NOT NULL,
date_valid datetime,
fk_user_creat integer NOT NULL, fk_user_creat integer NOT NULL,
fk_user_modif integer, fk_user_modif integer,
fk_user_valid integer,
import_key varchar(14), import_key varchar(14),
status integer NOT NULL, status integer NOT NULL,
fk_product integer, fk_product integer,

View File

@ -126,7 +126,6 @@ AddEvent=Create event
MyAvailability=My availability MyAvailability=My availability
ActionType=Event type ActionType=Event type
DateActionBegin=Start event date DateActionBegin=Start event date
CloneAction=Clone event
ConfirmCloneEvent=Are you sure you want to clone the event <b>%s</b>? ConfirmCloneEvent=Are you sure you want to clone the event <b>%s</b>?
RepeatEvent=Repeat event RepeatEvent=Repeat event
EveryWeek=Every week EveryWeek=Every week

View File

@ -322,7 +322,6 @@ PaymentNumber=Payment number
RemoveDiscount=Remove discount RemoveDiscount=Remove discount
WatermarkOnDraftBill=Watermark on draft invoices (nothing if empty) WatermarkOnDraftBill=Watermark on draft invoices (nothing if empty)
InvoiceNotChecked=No invoice selected InvoiceNotChecked=No invoice selected
CloneInvoice=Clone invoice
ConfirmCloneInvoice=Are you sure you want to clone this invoice <b>%s</b>? ConfirmCloneInvoice=Are you sure you want to clone this invoice <b>%s</b>?
DisabledBecauseReplacedInvoice=Action disabled because invoice has been replaced 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. DescTaxAndDividendsArea=This area presents a summary of all payments made for special expenses. Only records with payments during the fixed year are included here.

View File

@ -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_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=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. 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 ConfirmCloneTax=Confirm the clone of a social/fiscal tax
CloneTaxForNextMonth=Clone it for next month CloneTaxForNextMonth=Clone it for next month
SimpleReport=Simple report SimpleReport=Simple report

View File

@ -85,7 +85,6 @@ NoteListOfYourExpiredServices=This list contains only services of contracts for
StandardContractsTemplate=Standard contracts template StandardContractsTemplate=Standard contracts template
ContactNameAndSignature=For %s, name and signature: ContactNameAndSignature=For %s, name and signature:
OnlyLinesWithTypeServiceAreUsed=Only lines with type "Service" will be cloned. OnlyLinesWithTypeServiceAreUsed=Only lines with type "Service" will be cloned.
CloneContract=Clone contract
ConfirmCloneContract=Are you sure you want to clone the contract <b>%s</b>? ConfirmCloneContract=Are you sure you want to clone the contract <b>%s</b>?
LowerDateEndPlannedShort=Lower planned end date of active services LowerDateEndPlannedShort=Lower planned end date of active services
SendContractRef=Contract information __REF__ SendContractRef=Contract information __REF__

View File

@ -15,7 +15,6 @@ DeleteIntervention=Delete intervention
ValidateIntervention=Validate intervention ValidateIntervention=Validate intervention
ModifyIntervention=Modify intervention ModifyIntervention=Modify intervention
DeleteInterventionLine=Delete intervention line DeleteInterventionLine=Delete intervention line
CloneIntervention=Clone intervention
ConfirmDeleteIntervention=Are you sure you want to delete this intervention? ConfirmDeleteIntervention=Are you sure you want to delete this intervention?
ConfirmValidateIntervention=Are you sure you want to validate this intervention under name <b>%s</b>? ConfirmValidateIntervention=Are you sure you want to validate this intervention under name <b>%s</b>?
ConfirmModifyIntervention=Are you sure you want to modify this intervention? ConfirmModifyIntervention=Are you sure you want to modify this intervention?

View File

@ -58,7 +58,6 @@ EMailTestSubstitutionReplacedByGenericValues=When using test mode, substitutions
MailingAddFile=Attach this file MailingAddFile=Attach this file
NoAttachedFiles=No attached files NoAttachedFiles=No attached files
BadEMail=Bad value for Email BadEMail=Bad value for Email
CloneEMailing=Clone Emailing
ConfirmCloneEMailing=Are you sure you want to clone this emailing? ConfirmCloneEMailing=Are you sure you want to clone this emailing?
CloneContent=Clone message CloneContent=Clone message
CloneReceivers=Cloner recipients CloneReceivers=Cloner recipients

View File

@ -40,7 +40,7 @@ PageForAgendaTab=PHP page for event tab
PageForDocumentTab=PHP page for document tab PageForDocumentTab=PHP page for document tab
PageForNoteTab=PHP page for note tab PageForNoteTab=PHP page for note tab
PathToModulePackage=Path to zip of module/application package 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. SpaceOrSpecialCharAreNotAllowed=Spaces or special characters are not allowed.
FileNotYetGenerated=File not yet generated FileNotYetGenerated=File not yet generated
RegenerateClassAndSql=Erase and regenerate class and sql files RegenerateClassAndSql=Erase and regenerate class and sql files
@ -76,7 +76,7 @@ ListOfMenusEntries=List of menu entries
ListOfPermissionsDefined=List of defined permissions ListOfPermissionsDefined=List of defined permissions
SeeExamples=See examples here SeeExamples=See examples here
EnabledDesc=Condition to have this field active (Examples: 1 or $conf->global->MYMODULE_MYOPTION) 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) 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) 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. 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.

View File

@ -1,8 +1,11 @@
MenuBOM=Bills of material
BillOfMaterials=Bill of Material
BOMsSetup=Setup of module BOM BOMsSetup=Setup of module BOM
ListOfBOMs=List of BOMs ListOfBOMs=List of bills of material (BOM)
NewBOM=New BOM NewBOM=New bill of material
ProductBOMHelp=Product to create with this BOM ProductBOMHelp=Product to create with this BOM
BOMsNumberingModules=BOMs numbering templates BOMsNumberingModules=BOM numbering templates
BOMsModelModule=BOMS document templates BOMsModelModule=BOMS document templates
FreeLegalTextOnBOMs=Free text on document of BOMs FreeLegalTextOnBOMs=Free text on document of BOM
WatermarkOnDraftBOMs=Watermark on draft BOMs WatermarkOnDraftBOMs=Watermark on draft BOM
ConfirmCloneBillOfMaterials=Are you sure you want to clone this bill of material ?

View File

@ -110,7 +110,6 @@ OrderMode=Order method
AuthorRequest=Request author AuthorRequest=Request author
UserWithApproveOrderGrant=Users granted with "approve orders" permission. UserWithApproveOrderGrant=Users granted with "approve orders" permission.
PaymentOrderRef=Payment of order %s PaymentOrderRef=Payment of order %s
CloneOrder=Clone order
ConfirmCloneOrder=Are you sure you want to clone this order <b>%s</b>? ConfirmCloneOrder=Are you sure you want to clone this order <b>%s</b>?
DispatchSupplierOrder=Receiving purchase order %s DispatchSupplierOrder=Receiving purchase order %s
FirstApprovalAlreadyDone=First approval already done FirstApprovalAlreadyDone=First approval already done

View File

@ -144,7 +144,6 @@ ListProductByPopularity=List of products by popularity
ListServiceByPopularity=List of services by popularity ListServiceByPopularity=List of services by popularity
Finished=Manufactured product Finished=Manufactured product
RowMaterial=Raw Material RowMaterial=Raw Material
CloneProduct=Clone product or service
ConfirmCloneProduct=Are you sure you want to clone product or service <b>%s</b>? ConfirmCloneProduct=Are you sure you want to clone product or service <b>%s</b>?
CloneContentProduct=Clone all main information of product/service CloneContentProduct=Clone all main information of product/service
ClonePricesProduct=Clone prices ClonePricesProduct=Clone prices

View File

@ -131,7 +131,6 @@ TaskIsNotAssignedToUser=Task not assigned to user. Use button '<strong>%s</stron
ErrorTimeSpentIsEmpty=Time spent is empty ErrorTimeSpentIsEmpty=Time spent is empty
ThisWillAlsoRemoveTasks=This action will also delete all tasks of project (<b>%s</b> tasks at the moment) and all inputs of time spent. ThisWillAlsoRemoveTasks=This action will also delete all tasks of project (<b>%s</b> 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. 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 CloneTasks=Clone tasks
CloneContacts=Clone contacts CloneContacts=Clone contacts
CloneNotes=Clone notes CloneNotes=Clone notes

View File

@ -56,7 +56,6 @@ CopyPropalFrom=Create commercial proposal by copying existing proposal
CreateEmptyPropal=Create empty commercial proposal or from list of products/services CreateEmptyPropal=Create empty commercial proposal or from list of products/services
DefaultProposalDurationValidity=Default commercial proposal validity duration (in days) 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 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 <b>%s</b>? ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s</b>?
ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>?
ProposalsAndProposalsLines=Commercial proposal and lines ProposalsAndProposalsLines=Commercial proposal and lines

View File

@ -34,7 +34,6 @@ SupplierProposalStatusSignedShort=Accepted
SupplierProposalStatusNotSignedShort=Refused SupplierProposalStatusNotSignedShort=Refused
CopyAskFrom=Create price request by copying existing a request CopyAskFrom=Create price request by copying existing a request
CreateEmptyAsk=Create blank request CreateEmptyAsk=Create blank request
CloneAsk=Clone price request
ConfirmCloneAsk=Are you sure you want to clone the price request <b>%s</b>? ConfirmCloneAsk=Are you sure you want to clone the price request <b>%s</b>?
ConfirmReOpenAsk=Are you sure you want to open back the price request <b>%s</b>? ConfirmReOpenAsk=Are you sure you want to open back the price request <b>%s</b>?
SendAskByMail=Send price request by mail SendAskByMail=Send price request by mail

View File

@ -109,7 +109,6 @@ NoTripsToExportCSV=No expense report to export for this period.
ExpenseReportPayment=Expense report payment ExpenseReportPayment=Expense report payment
ExpenseReportsToApprove=Expense reports to approve ExpenseReportsToApprove=Expense reports to approve
ExpenseReportsToPay=Expense reports to pay ExpenseReportsToPay=Expense reports to pay
CloneExpenseReport=Clone expense report
ConfirmCloneExpenseReport=Are you sure you want to clone this expense report ? ConfirmCloneExpenseReport=Are you sure you want to clone this expense report ?
ExpenseReportsIk=Expense report milles index ExpenseReportsIk=Expense report milles index
ExpenseReportsRules=Expense report rules ExpenseReportsRules=Expense report rules

View File

@ -269,12 +269,12 @@ DatePayment=Date paiement
DateApprove=Date approbation DateApprove=Date approbation
DateApprove2=Date approbation (deuxième approbation) DateApprove2=Date approbation (deuxième approbation)
RegistrationDate=Date d'inscription RegistrationDate=Date d'inscription
UserCreation=Création de l'utilisateur UserCreation=Utilisateur de création
UserModification=Modification de l'utilisateur UserModification=Utilisateur de modification
UserValidation=Validation de l'utilisateur UserValidation=Utilisateur de validation
UserCreationShort=Création de l'utilisateur UserCreationShort=Util. de création
UserModificationShort=Modification de l'utilisateur UserModificationShort=Util. de modification
UserValidationShort=Utilisateur actif UserValidationShort=Util. de validation
DurationYear=an DurationYear=an
DurationMonth=mois DurationMonth=mois
DurationWeek=semaine DurationWeek=semaine

View File

@ -930,7 +930,7 @@ if ($dirins && $action == 'generatepackage')
if ($dirins && $action == 'generatedoc') if ($dirins && $action == 'generatedoc')
{ {
$FILENAMEDOC=strtolower($module).'.html'; // TODO Use/text PDF $FILENAMEDOC=strtolower($module).'.html';
$dirofmodule = dol_buildpath(strtolower($module), 0).'/doc'; $dirofmodule = dol_buildpath(strtolower($module), 0).'/doc';
$outputfiledoc = $dirofmodule.'/'.$FILENAMEDOC; $outputfiledoc = $dirofmodule.'/'.$FILENAMEDOC;
@ -947,6 +947,7 @@ if ($dirins && $action == 'generatedoc')
} }
} }
// Save file // Save file
if ($action == 'savefile' && empty($cancel)) if ($action == 'savefile' && empty($cancel))
{ {
@ -2814,9 +2815,11 @@ elseif (! empty($module))
$outputfilezip = dol_buildpath($modulelowercase, 0).'/bin/'.$FILENAMEZIP; $outputfilezip = dol_buildpath($modulelowercase, 0).'/bin/'.$FILENAMEZIP;
$FILENAMEDOC=$modulelowercase.'.html'; $FILENAMEDOC=$modulelowercase.'.html';
$FILENAMEDOCPDF=$modulelowercase.'.pdf';
$outputfiledoc = dol_buildpath($modulelowercase, 0).'/doc/'.$FILENAMEDOC; $outputfiledoc = dol_buildpath($modulelowercase, 0).'/doc/'.$FILENAMEDOC;
$outputfiledocurl = dol_buildpath($modulelowercase, 1).'/doc/'.$FILENAMEDOC; $outputfiledocurl = dol_buildpath($modulelowercase, 1).'/doc/'.$FILENAMEDOC;
// TODO Use/test PDF $outputfiledocpdf = dol_buildpath($modulelowercase, 0).'/doc/'.$FILENAMEDOCPDF;
$outputfiledocurlpdf = dol_buildpath($modulelowercase, 1).'/doc/'.$FILENAMEDOCPDF;
} }
print '<br>'; print '<br>';
@ -2842,7 +2845,8 @@ elseif (! empty($module))
print '<br><br><br>'; print '<br><br><br>';
print '<span class="fa fa-file-o"></span> '. $langs->trans("PathToModuleDocumentation") . ' : '; // HTML
print '<span class="fa fa-file-o"></span> '. $langs->trans("PathToModuleDocumentation", "HTML") . ' : ';
if (! dol_is_file($outputfiledoc)) print '<strong>'.$langs->trans("FileNotYetGenerated").'</strong>'; if (! dol_is_file($outputfiledoc)) print '<strong>'.$langs->trans("FileNotYetGenerated").'</strong>';
else { else {
print '<strong>'; print '<strong>';
@ -2854,6 +2858,19 @@ elseif (! empty($module))
} }
print '</strong><br>'; print '</strong><br>';
// PDF
print '<span class="fa fa-file-o"></span> '. $langs->trans("PathToModuleDocumentation", "PDF") . ' : ';
if (! dol_is_file($outputfiledocpdf)) print '<strong>'.$langs->trans("FileNotYetGenerated").'</strong>';
else {
print '<strong>';
print '<a href="'.$outputfiledocurlpdf.'" target="_blank">';
print $outputfiledocpdf;
print '</a>';
print '</strong>';
print ' ('.$langs->trans("GeneratedOn").' '.dol_print_date(dol_filemtime($outputfiledocpdf), 'dayhour').')';
}
print '</strong><br>';
print '<br>'; print '<br>';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="generatedoc">'; print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="generatedoc">';

View File

@ -58,11 +58,16 @@ class MyObject extends CommonObject
public $picto = 'myobject@mymodule'; 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. * 'label' the translation key.
* 'enabled' is a condition when the field must be managed. * '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). * '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) * '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. * '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. * @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( public $fields=array(
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'), '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'), '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, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20), '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), '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'), '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'),
'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'), '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), '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_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), '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), '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), '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), //'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_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), //'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), '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')),
); );
/** /**

View File

@ -130,7 +130,7 @@ if (empty($reshook))
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
// Actions when linking object each other // 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 // Actions when printing a doc from card
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; 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') { if ($action == 'clone') {
// Create an array for form // Create an array for form
$formquestion = array(); $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 // Confirmation of action xxxx

View File

@ -409,6 +409,7 @@ foreach($object->fields as $key => $val)
$cssforfield=''; $cssforfield='';
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; 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('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 ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
if (! empty($arrayfields['t.'.$key]['checked'])) print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>'; if (! empty($arrayfields['t.'.$key]['checked'])) print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>';
} }
@ -435,6 +436,7 @@ foreach($object->fields as $key => $val)
$cssforfield=''; $cssforfield='';
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; 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('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 ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
if (! empty($arrayfields['t.'.$key]['checked'])) 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'; if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
elseif ($key == 'ref') $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'])) if (! empty($arrayfields['t.'.$key]['checked']))
{ {
print '<td'; print '<td';
@ -499,7 +503,9 @@ while ($i < min($num, $limit))
print $val['css']; print $val['css'];
if ($cssforfield || $val['css']) print '"'; if ($cssforfield || $val['css']) print '"';
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 '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
if (! empty($val['isameasure'])) if (! empty($val['isameasure']))

View File

@ -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 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 || (! 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);
} }

View File

@ -662,76 +662,76 @@ if (! empty($arrayfields['s.nom']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
if (! empty($search_nom_only) && empty($search_nom)) $search_nom=$search_nom_only; if (! empty($search_nom_only) && empty($search_nom)) $search_nom=$search_nom_only;
print '<input class="flat searchstring maxwidth50" type="text" name="search_nom" value="'.dol_escape_htmltag($search_nom).'">'; print '<input class="flat searchstring maxwidth75imp" type="text" name="search_nom" value="'.dol_escape_htmltag($search_nom).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['s.name_alias']['checked'])) if (! empty($arrayfields['s.name_alias']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_alias" value="'.dol_escape_htmltag($search_alias).'">'; print '<input class="flat searchstring maxwidth75imp" type="text" name="search_alias" value="'.dol_escape_htmltag($search_alias).'">';
print '</td>'; print '</td>';
} }
// Barcode // Barcode
if (! empty($arrayfields['s.barcode']['checked'])) if (! empty($arrayfields['s.barcode']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_barcode" value="'.dol_escape_htmltag($search_barcode).'">'; print '<input class="flat searchstring maxwidth75imp" type="text" name="search_barcode" value="'.dol_escape_htmltag($search_barcode).'">';
print '</td>'; print '</td>';
} }
// Customer code // Customer code
if (! empty($arrayfields['s.code_client']['checked'])) if (! empty($arrayfields['s.code_client']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_customer_code" value="'.dol_escape_htmltag($search_customer_code).'">'; print '<input class="flat searchstring maxwidth75imp" type="text" name="search_customer_code" value="'.dol_escape_htmltag($search_customer_code).'">';
print '</td>'; print '</td>';
} }
// Supplier code // Supplier code
if (! empty($arrayfields['s.code_fournisseur']['checked'])) if (! empty($arrayfields['s.code_fournisseur']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_supplier_code" value="'.dol_escape_htmltag($search_supplier_code).'">'; print '<input class="flat searchstring maxwidth75imp" type="text" name="search_supplier_code" value="'.dol_escape_htmltag($search_supplier_code).'">';
print '</td>'; print '</td>';
} }
// Account Customer code // Account Customer code
if (! empty($arrayfields['s.code_compta']['checked'])) if (! empty($arrayfields['s.code_compta']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_account_customer_code" value="'.dol_escape_htmltag($search_account_customer_code).'">'; print '<input class="flat searchstring maxwidth75imp" type="text" name="search_account_customer_code" value="'.dol_escape_htmltag($search_account_customer_code).'">';
print '</td>'; print '</td>';
} }
// Account Supplier code // Account Supplier code
if (! empty($arrayfields['s.code_compta_fournisseur']['checked'])) if (! empty($arrayfields['s.code_compta_fournisseur']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat maxwidth50" type="text" name="search_account_supplier_code" value="'.dol_escape_htmltag($search_account_supplier_code).'">'; print '<input class="flat maxwidth75imp" type="text" name="search_account_supplier_code" value="'.dol_escape_htmltag($search_account_supplier_code).'">';
print '</td>'; print '</td>';
} }
// Town // Town
if (! empty($arrayfields['s.town']['checked'])) if (! empty($arrayfields['s.town']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring" size="6" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'">';
print '</td>'; print '</td>';
} }
// Zip // Zip
if (! empty($arrayfields['s.zip']['checked'])) if (! empty($arrayfields['s.zip']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).'">';
print '</td>'; print '</td>';
} }
// State // State
if (! empty($arrayfields['state.nom']['checked'])) if (! empty($arrayfields['state.nom']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">';
print '</td>'; print '</td>';
} }
// Region // Region
if (! empty($arrayfields['region.nom']['checked'])) if (! empty($arrayfields['region.nom']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_region" value="'.dol_escape_htmltag($search_region).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_region" value="'.dol_escape_htmltag($search_region).'">';
print '</td>'; print '</td>';
} }
// Country // Country
@ -759,77 +759,77 @@ if (! empty($arrayfields['s.email']['checked']))
{ {
// Email // Email
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchemail maxwidth50" type="text" name="search_email" value="'.dol_escape_htmltag($search_email).'">'; print '<input class="flat searchemail maxwidth50imp" type="text" name="search_email" value="'.dol_escape_htmltag($search_email).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['s.phone']['checked'])) if (! empty($arrayfields['s.phone']['checked']))
{ {
// Phone // Phone
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_phone" value="'.dol_escape_htmltag($search_phone).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_phone" value="'.dol_escape_htmltag($search_phone).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['s.fax']['checked'])) if (! empty($arrayfields['s.fax']['checked']))
{ {
// Fax // Fax
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring" size="4" type="text" name="search_fax" value="'.dol_escape_htmltag($search_fax).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_fax" value="'.dol_escape_htmltag($search_fax).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['s.url']['checked'])) if (! empty($arrayfields['s.url']['checked']))
{ {
// Url // Url
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_url" value="'.dol_escape_htmltag($search_url).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_url" value="'.dol_escape_htmltag($search_url).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['s.siren']['checked'])) if (! empty($arrayfields['s.siren']['checked']))
{ {
// IdProf1 // IdProf1
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_idprof1" value="'.dol_escape_htmltag($search_idprof1).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_idprof1" value="'.dol_escape_htmltag($search_idprof1).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['s.siret']['checked'])) if (! empty($arrayfields['s.siret']['checked']))
{ {
// IdProf2 // IdProf2
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring" size="4" type="text" name="search_idprof2" value="'.dol_escape_htmltag($search_idprof2).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_idprof2" value="'.dol_escape_htmltag($search_idprof2).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['s.ape']['checked'])) if (! empty($arrayfields['s.ape']['checked']))
{ {
// IdProf3 // IdProf3
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring" size="4" type="text" name="search_idprof3" value="'.dol_escape_htmltag($search_idprof3).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_idprof3" value="'.dol_escape_htmltag($search_idprof3).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['s.idprof4']['checked'])) if (! empty($arrayfields['s.idprof4']['checked']))
{ {
// IdProf4 // IdProf4
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_idprof4" value="'.dol_escape_htmltag($search_idprof4).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_idprof4" value="'.dol_escape_htmltag($search_idprof4).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['s.idprof5']['checked'])) if (! empty($arrayfields['s.idprof5']['checked']))
{ {
// IdProf5 // IdProf5
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_idprof5" value="'.dol_escape_htmltag($search_idprof5).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_idprof5" value="'.dol_escape_htmltag($search_idprof5).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['s.idprof6']['checked'])) if (! empty($arrayfields['s.idprof6']['checked']))
{ {
// IdProf6 // IdProf6
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_idprof6" value="'.dol_escape_htmltag($search_idprof6).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_idprof6" value="'.dol_escape_htmltag($search_idprof6).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['s.tva_intra']['checked'])) if (! empty($arrayfields['s.tva_intra']['checked']))
{ {
// Vat number // Vat number
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_vat" value="'.dol_escape_htmltag($search_vat).'">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_vat" value="'.dol_escape_htmltag($search_vat).'">';
print '</td>'; print '</td>';
} }
@ -863,7 +863,7 @@ if (! empty($arrayfields['s.fk_stcomm']['checked']))
if (! empty($arrayfields['s2.nom']['checked'])) if (! empty($arrayfields['s2.nom']['checked']))
{ {
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_parent_name" value="'.dol_escape_htmltag($search_parent_name).'">'; print '<input class="flat searchstring maxwidth75imp" type="text" name="search_parent_name" value="'.dol_escape_htmltag($search_parent_name).'">';
print '</td>'; print '</td>';
} }
// Extra fields // Extra fields

View File

@ -1209,8 +1209,8 @@ if ($action == 'create')
print '<input type="hidden" name="originid" value="' . $objectsrc->id . '">'; print '<input type="hidden" name="originid" value="' . $objectsrc->id . '">';
print '<tr><td>' . $langs->trans('CommRequest') . '</td><td colspan="2">' . $objectsrc->getNomUrl(1) . '</td></tr>'; print '<tr><td>' . $langs->trans('CommRequest') . '</td><td colspan="2">' . $objectsrc->getNomUrl(1) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td colspan="2">' . price($objectsrc->total_ht) . '</td></tr>'; print '<tr><td>' . $langs->trans('AmountHT') . '</td><td colspan="2">' . price($objectsrc->total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva) . "</td></tr>"; print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva) . "</td></tr>";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0 ) // Localtax1 if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0 ) // Localtax1
{ {
print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax1) . "</td></tr>"; print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax1) . "</td></tr>";
@ -1220,13 +1220,13 @@ if ($action == 'create')
{ {
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax2) . "</td></tr>"; print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax2) . "</td></tr>";
} }
print '<tr><td>' . $langs->trans('TotalTTC') . '</td><td colspan="2">' . price($objectsrc->total_ttc) . "</td></tr>"; print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td colspan="2">' . price($objectsrc->total_ttc) . "</td></tr>";
if (!empty($conf->multicurrency->enabled)) if (!empty($conf->multicurrency->enabled))
{ {
print '<tr><td>' . $langs->trans('MulticurrencyTotalHT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ht) . '</td></tr>'; print '<tr><td>' . $langs->trans('MulticurrencyAmountHT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('MulticurrencyTotalVAT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_tva) . "</td></tr>"; print '<tr><td>' . $langs->trans('MulticurrencyAmountVAT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_tva) . "</td></tr>";
print '<tr><td>' . $langs->trans('MulticurrencyTotalTTC') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>"; print '<tr><td>' . $langs->trans('MulticurrencyAmountTTC') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>";
} }
} }
@ -1328,7 +1328,7 @@ if ($action == 'create')
// 1), // 1),
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', 's.fournisseur=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 // 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 // Confirm delete

View File

@ -25,13 +25,13 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
.badge-pill, .tabs .badge { .badge-pill, .tabs .badge {
padding-right: .6em; padding-right: .6em;
padding-left: .6em; padding-left: .6em;
border-radius: 10rem; border-radius: 0.25rem;
} }
.badge-dot { .badge-dot {
padding: 0; padding: 0;
border-radius: 50%; border-radius: 50%;
padding: 0.6em; padding: 0.25rem;
vertical-align: middle; vertical-align: middle;
} }
@ -39,8 +39,10 @@ a.badge:focus, a.badge:hover {
text-decoration: none; text-decoration: none;
} }
.liste_titre .badge {
background-color: <?php print $badgeSecondary; ?>;
color: #fff;
}
/* PRIMARY */ /* PRIMARY */

View File

@ -62,7 +62,7 @@ $toolTipFontColor='#333';
// Badges colors // Badges colors
$badgePrimary ='#007bff'; $badgePrimary ='#007bff';
$badgeSecondary ='#6c757d'; $badgeSecondary ='#999999';
$badgeSuccess ='#28a745'; $badgeSuccess ='#28a745';
$badgeDanger ='#dc3545'; $badgeDanger ='#dc3545';
$badgeWarning ='#ffc107'; $badgeWarning ='#ffc107';

View File

@ -640,6 +640,7 @@ while ($i < min($num, $limit))
if ($cssforfield || $val['css']) print '"'; if ($cssforfield || $val['css']) print '"';
print '>'; print '>';
if ($key == 'fk_statut') print $object->getLibStatut(5); 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, ''); else print $object->showOutputField($val, $key, $obj->$key, '');
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;

View File

@ -640,22 +640,7 @@ if (! empty($id) || ! empty($ref))
); );
} }
} elseif ($action === 'copy') { } elseif ($action === 'copy') {
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);
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
);
} }
$comb2val = new ProductCombination2ValuePair($db); $comb2val = new ProductCombination2ValuePair($db);