This commit is contained in:
Frédéric FRANCE
2019-10-20 11:17:54 +02:00
parent 66b0c27645
commit 33c35780e0
26 changed files with 479 additions and 506 deletions

View File

@@ -539,7 +539,9 @@ class Setup extends DolibarrApi
$sql.= " WHERE t.active = ".$active; $sql.= " WHERE t.active = ".$active;
if (!empty($multicurrency)) { if (!empty($multicurrency)) {
$sql.= " AND m.entity IN (".getEntity('multicurrency').")"; $sql.= " AND m.entity IN (".getEntity('multicurrency').")";
if (!empty($multicurrency) && $multicurrency != 2) $sql.= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)"; if (!empty($multicurrency) && $multicurrency != 2) {
$sql.= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)";
}
} }
// Add sql filters // Add sql filters

View File

@@ -574,7 +574,7 @@ jQuery(document).ready(function () {
if(!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) if(!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL))
{ {
?> ?>
<script type="text/javascript"> <script type="text/javascript">
$.ajax({ $.ajax({
@@ -592,7 +592,7 @@ if(!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->globa
}); });
</script> </script>
<?php <?php
} }
if (GETPOST('withtab', 'alpha')) if (GETPOST('withtab', 'alpha'))

View File

@@ -47,22 +47,20 @@ $colspan = 3; // Columns: total ht + col edit + col delete
// Lines for extrafield // Lines for extrafield
$objectline = new BOMLine($this->db); $objectline = new BOMLine($this->db);
?>
<!-- BEGIN PHP TEMPLATE objectline_create.tpl.php --> print "<!-- BEGIN PHP TEMPLATE objectline_create.tpl.php -->\n";
<?php
$nolinesbefore=(count($this->lines) == 0 || $forcetoshowtitlelines); $nolinesbefore=(count($this->lines) == 0 || $forcetoshowtitlelines);
if ($nolinesbefore) { if ($nolinesbefore) {
?> print '<tr class="liste_titre'.($nolinesbefore?'':' liste_titre_add_').' nodrag nodrop">';
<tr class="liste_titre<?php echo ($nolinesbefore?'':' liste_titre_add_') ?> nodrag nodrop"> if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?> print '<td class="linecolnum center"></td>';
<td class="linecolnum center"></td> }
<?php } ?> print '<td class="linecoldescription minwidth500imp">';
<td class="linecoldescription minwidth500imp"> print '<div id="add"></div><span class="hideonsmartphone">'.$langs->trans('AddNewLine').'</span>';
<div id="add"></div><span class="hideonsmartphone"><?php echo $langs->trans('AddNewLine'); ?></span><?php // echo $langs->trans("FreeZone"); ?> // echo $langs->trans("FreeZone");
</td> print '</td>';
<td class="linecolqty right"><?php echo $langs->trans('Qty'); ?></td> print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>';
<?php
if ($conf->global->PRODUCT_USE_UNITS) if ($conf->global->PRODUCT_USE_UNITS)
{ {
print '<td class="linecoluseunit left">'; print '<td class="linecoluseunit left">';
@@ -70,31 +68,25 @@ if ($nolinesbefore) {
print $langs->trans('Unit'); print $langs->trans('Unit');
print '</span></td>'; print '</span></td>';
} }
?> print '<td class="linecollost right">'.$form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')).'</td>';
<td class="linecollost right"><?php echo $form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')); ?></td> print '<td class="linecoledit" colspan="'.$colspan.'">&nbsp;</td>';
<td class="linecoledit" colspan="<?php echo $colspan; ?>">&nbsp;</td> print '</tr>';
</tr>
<?php
} }
?> print '<tr class="pair nodrag nodrop nohoverpair'.($nolinesbefore || $object->element=='contrat')?'':' liste_titre_create'.'">';
<tr class="pair nodrag nodrop nohoverpair<?php echo ($nolinesbefore || $object->element=='contrat')?'':' liste_titre_create'; ?>"> $coldisplay=0;
<?php
$coldisplay=0;
// Adds a line numbering column // Adds a line numbering column
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
$coldisplay++; $coldisplay++;
echo '<td class="nobottom linecolnum center"></td>'; echo '<td class="nobottom linecolnum center"></td>';
} }
$coldisplay++; $coldisplay++;
?> print '<td class="nobottom linecoldescription minwidth500imp">';
<td class="nobottom linecoldescription minwidth500imp">
<?php // Predefined product/service
// Predefined product/service if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) {
{
if ($forceall >= 0 && $freelines) echo '<br>'; if ($forceall >= 0 && $freelines) echo '<br>';
echo '<span class="prod_entry_mode_predef">'; echo '<span class="prod_entry_mode_predef">';
$filtertype=''; $filtertype='';
@@ -112,34 +104,32 @@ if ($nolinesbefore) {
} }
echo '</span>'; echo '</span>';
} }
$coldisplay++; $coldisplay++;
?> print '<td class="nobottom linecolqty right"><input type="text" size="2" name="qty" id="qty" class="flat right" value="'.(isset($_POST["qty"])?GETPOST("qty", 'alpha', 2):1).'">';
<td class="nobottom linecolqty right"><input type="text" size="2" name="qty" id="qty" class="flat right" value="<?php echo (isset($_POST["qty"])?GETPOST("qty", 'alpha', 2):1); ?>"> print '</td>';
</td> if($conf->global->PRODUCT_USE_UNITS)
<?php {
if($conf->global->PRODUCT_USE_UNITS)
{
$coldisplay++; $coldisplay++;
print '<td class="nobottom linecoluseunit left">'; print '<td class="nobottom linecoluseunit left">';
print $form->selectUnits($line->fk_unit, "units"); print $form->selectUnits($line->fk_unit, "units");
print '</td>'; print '</td>';
} }
$coldisplay++; $coldisplay++;
?>
<td class="nobottom nowrap linecollost right"><input type="text" size="1" name="efficiency" id="efficiency" class="flat right" value="<?php echo (GETPOSTISSET("efficiency")?GETPOST("efficiency", 'alpha'):1); ?>"></td>
<?php
$coldisplay+=$colspan; print '<td class="nobottom nowrap linecollost right">';
?> print '<input type="text" size="1" name="efficiency" id="efficiency" class="flat right" value="'.(GETPOSTISSET("efficiency")?GETPOST("efficiency", 'alpha'):1).'">';
<td class="nobottom linecoledit center valignmiddle" colspan="<?php echo $colspan; ?>"> print '</td>';
<input type="submit" class="button" value="<?php echo $langs->trans('Add'); ?>" name="addline" id="addline">
</td>
</tr> $coldisplay += $colspan;
print '<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.'">';
print '<input type="submit" class="button" value="'.$langs->trans('Add').'" name="addline" id="addline">';
print '</td>';
print '</tr>';
<?php
if (is_object($objectline)) { if (is_object($objectline)) {
print $objectline->showOptionals($extrafields, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); print $objectline->showOptionals($extrafields, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
} }

View File

@@ -49,22 +49,19 @@ $colspan = 3; // Columns: total ht + col edit + col delete
// Lines for extrafield // Lines for extrafield
$objectline = new BOMLine($this->db); $objectline = new BOMLine($this->db);
?>
<!-- BEGIN PHP TEMPLATE objectline_edit.tpl.php --> print "<!-- BEGIN PHP TEMPLATE objectline_edit.tpl.php -->\n";
<?php
$coldisplay=0; $coldisplay=0;
?> print '<tr class="oddeven tredited">';
<tr class="oddeven tredited"> // Adds a line numbering column
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
// Adds a line numbering column print '<td class="linecolnum center">'.($i+1).'</td>';
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
<td class="linecolnum center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td>
<?php }
$coldisplay++; $coldisplay++;
?> }
$coldisplay++;
?>
<td> <td>
<div id="line_<?php echo $line->id; ?>"></div> <div id="line_<?php echo $line->id; ?>"></div>
@@ -74,72 +71,66 @@ $coldisplay=0;
<input type="hidden" id="special_code" name="special_code" value="<?php echo $line->special_code; ?>"> <input type="hidden" id="special_code" name="special_code" value="<?php echo $line->special_code; ?>">
<input type="hidden" id="fk_parent_line" name="fk_parent_line" value="<?php echo $line->fk_parent_line; ?>"> <input type="hidden" id="fk_parent_line" name="fk_parent_line" value="<?php echo $line->fk_parent_line; ?>">
<?php <?php
// Predefined product/service // Predefined product/service
if ($line->fk_product > 0) { if ($line->fk_product > 0) {
$tmpproduct = new Product($object->db); $tmpproduct = new Product($object->db);
$tmpproduct->fetch($line->fk_product); $tmpproduct->fetch($line->fk_product);
print $tmpproduct->getNomUrl(1); print $tmpproduct->getNomUrl(1);
} }
if (is_object($hookmanager)) if (is_object($hookmanager))
{ {
$fk_parent_line = (GETPOST('fk_parent_line') ? GETPOST('fk_parent_line') : $line->fk_parent_line); $fk_parent_line = (GETPOST('fk_parent_line') ? GETPOST('fk_parent_line') : $line->fk_parent_line);
$parameters=array('line'=>$line,'fk_parent_line'=>$fk_parent_line,'var'=>$var,'dateSelector'=>$dateSelector,'seller'=>$seller,'buyer'=>$buyer); $parameters=array('line'=>$line,'fk_parent_line'=>$fk_parent_line,'var'=>$var,'dateSelector'=>$dateSelector,'seller'=>$seller,'buyer'=>$buyer);
$reshook=$hookmanager->executeHooks('formEditProductOptions', $parameters, $this, $action); $reshook=$hookmanager->executeHooks('formEditProductOptions', $parameters, $this, $action);
} }
?> print '</td>';
</td>
<?php /*if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
/*if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines {
{
$coldisplay++; $coldisplay++;
?> ?>
<td class="right"><input id="fourn_ref" name="fourn_ref" class="flat minwidth75" value="<?php echo ($line->ref_supplier ? $line->ref_supplier : $line->ref_fourn); ?>"></td> <td class="right"><input id="fourn_ref" name="fourn_ref" class="flat minwidth75" value="<?php echo ($line->ref_supplier ? $line->ref_supplier : $line->ref_fourn); ?>"></td>
<?php <?php
*/ */
$coldisplay++; $coldisplay++;
?>
<td class="nobottom linecolqty right"> print '<td class="nobottom linecolqty right">';
<?php if (($line->info_bits & 2) != 2) { if (($line->info_bits & 2) != 2) {
// I comment this because it shows info even when not required // I comment this because it shows info even when not required
// for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated // for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated
// must also not be output for most entities (proposal, intervention, ...) // must also not be output for most entities (proposal, intervention, ...)
//if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." ";
print '<input size="3" type="text" class="flat right" name="qty" id="qty" value="' . $line->qty . '">'; print '<input size="3" type="text" class="flat right" name="qty" id="qty" value="' . $line->qty . '">';
} }
?> print '</td>';
</td>
<?php if ($conf->global->PRODUCT_USE_UNITS)
if($conf->global->PRODUCT_USE_UNITS) {
{
$coldisplay++; $coldisplay++;
print '<td class="nobottom linecoluseunit left">'; print '<td class="nobottom linecoluseunit left">';
print $form->selectUnits($line->fk_unit, "units"); print $form->selectUnits($line->fk_unit, "units");
print '</td>'; print '</td>';
} }
$coldisplay++; $coldisplay++;
?> print '<td class="nobottom nowrap linecollost right">';
<td class="nobottom nowrap linecollost right"><input type="text" size="1" name="efficiency" id="efficiency" class="flat right" value="<?php echo $line->efficiency; ?>"></td> print '<input type="text" size="1" name="efficiency" id="efficiency" class="flat right" value="'.$line->efficiency.'"></td>';
<?php
$coldisplay+=$colspan; $coldisplay+=$colspan;
?> print '<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.'">';
<td class="nobottom linecoledit center valignmiddle" colspan="<?php echo $colspan; ?>"><?php $coldisplay+=$colspan; ?> $coldisplay+=$colspan;
<input type="submit" class="button" id="savelinebutton" name="save" value="<?php echo $langs->trans("Save"); ?>"><br> print '<input type="submit" class="button" id="savelinebutton" name="save" value="'.$langs->trans("Save").'">';
<input type="submit" class="button" id="cancellinebutton" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>"> print '<br>';
</td> print '<input type="submit" class="button" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'">';
</tr> print '</td>';
print '</tr>';
<?php
if (is_object($objectline)) { if (is_object($objectline)) {
print $objectline->showOptionals($extrafields, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); print $objectline->showOptionals($extrafields, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
} }
?>
<!-- END PHP TEMPLATE objectline_edit.tpl.php --> print "<!-- END PHP TEMPLATE objectline_edit.tpl.php -->\n";

View File

@@ -39,9 +39,7 @@ if (empty($object) || ! is_object($object))
print "Error, template page can't be called as URL"; print "Error, template page can't be called as URL";
exit; exit;
} }
?> print "<!-- BEGIN PHP TEMPLATE objectline_title.tpl.php -->\n";
<!-- BEGIN PHP TEMPLATE objectline_title.tpl.php -->
<?php
// Title line // Title line
print "<thead>\n"; print "<thead>\n";
@@ -79,6 +77,5 @@ if ($action == 'selectlines')
print "</tr>\n"; print "</tr>\n";
print "</thead>\n"; print "</thead>\n";
?>
<!-- END PHP TEMPLATE objectline_title.tpl.php --> print "<!-- END PHP TEMPLATE objectline_title.tpl.php -->\n";

View File

@@ -59,100 +59,93 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
// Lines for extrafield // Lines for extrafield
$objectline = new BOMLine($object->db); $objectline = new BOMLine($object->db);
?> $coldisplay=0;
<?php $coldisplay=0; ?> print "<!-- BEGIN PHP TEMPLATE objectline_view.tpl.php -->\n";
<!-- BEGIN PHP TEMPLATE objectline_view.tpl.php --> print '<tr id="row-'.$line->id.'" class="drag drop oddeven" '.$domData.' >';
<tr id="row-<?php echo $line->id?>" class="drag drop oddeven" <?php echo $domData; ?> > if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?> print '<td class="linecolnum center">'.($i+1).'</td>';
<td class="linecolnum center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td> $coldisplay++;
<?php } ?> }
<td class="linecoldescription minwidth300imp"><?php $coldisplay++; ?><div id="line_<?php echo $line->id; ?>"></div> print '<td class="linecoldescription minwidth300imp">';
<?php print '<div id="line_'.$line->id.'"></div>';
$tmpproduct = new Product($object->db); $coldisplay++;
$tmpproduct->fetch($line->fk_product); $tmpproduct = new Product($object->db);
print $tmpproduct->getNomUrl(1); $tmpproduct->fetch($line->fk_product);
?> print $tmpproduct->getNomUrl(1);
</td> print '</td>';
<td class="linecolqty nowrap right"><?php $coldisplay++; ?> print '<td class="linecolqty nowrap right">';
<?php $coldisplay++;
echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price
?> print '</td>';
</td>
<?php if($conf->global->PRODUCT_USE_UNITS)
if($conf->global->PRODUCT_USE_UNITS) {
{
print '<td class="linecoluseunit nowrap left">'; print '<td class="linecoluseunit nowrap left">';
$label = $line->getLabelOfUnit('short'); $label = $line->getLabelOfUnit('short');
if ($label !== '') { if ($label !== '') {
print $langs->trans($label); print $langs->trans($label);
} }
print '</td>'; print '</td>';
}
print '<td class="linecolqty nowrap right">';
$coldisplay++;
echo $line->efficiency;
print '</td>';
if ($this->statut == 0 && ($object_rights->write) && $action != 'selectlines' ) {
print '<td class="linecoledit center">';
$coldisplay++;
if (($line->info_bits & 2) == 2 || ! empty($disableedit)) {
} else {
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=editline&amp;lineid='.$line->id.'#line_'.$line->id.'">'.img_edit().'</a>';
} }
?> print '</td>';
<td class="linecolqty nowrap right"><?php $coldisplay++; ?>
<?php
echo $line->efficiency;
?>
</td>
<?php
if ($this->statut == 0 && ($object_rights->write) && $action != 'selectlines' ) { ?> print '<td class="linecoldelete center">';
<td class="linecoledit center"><?php $coldisplay++; ?> $coldisplay++;
<?php if (($line->info_bits & 2) == 2 || ! empty($disableedit)) { ?> if (($line->fk_prev_id == null ) && empty($disableremove)) {
<?php } else { ?> //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation
<a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=editline&amp;lineid='.$line->id.'#line_'.$line->id; ?>">
<?php echo img_edit(); ?>
</a>
<?php } ?>
</td>
<td class="linecoldelete center"><?php $coldisplay++; ?>
<?php
if (($line->fk_prev_id == null ) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $this->id . '&amp;action=deleteline&amp;lineid=' . $line->id . '">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $this->id . '&amp;action=deleteline&amp;lineid=' . $line->id . '">';
print img_delete(); print img_delete();
print '</a>'; print '</a>';
} }
?> print '</td>';
</td>
<?php if ($num > 1 && $conf->browser->layout != 'phone' && empty($disablemove)) {
if ($num > 1 && $conf->browser->layout != 'phone' && empty($disablemove)) { ?> print '<td class="linecolmove tdlineupdown center">';
<td class="linecolmove tdlineupdown center"><?php $coldisplay++; ?> $coldisplay++;
<?php if ($i > 0) { ?> if ($i > 0) {
<a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=up&amp;rowid='.$line->id; ?>"> print '<a class="lineupdown" href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=up&amp;rowid='.$line->id.'">';
<?php echo img_up('default', 0, 'imgupforline'); ?> echo img_up('default', 0, 'imgupforline');
</a> print '</a>';
<?php } ?>
<?php if ($i < $num-1) { ?>
<a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=down&amp;rowid='.$line->id; ?>">
<?php echo img_down('default', 0, 'imgdownforline'); ?>
</a>
<?php } ?>
</td>
<?php } else { ?>
<td <?php echo (($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"'); ?>><?php $coldisplay++; ?></td>
<?php } ?>
<?php
} else {
?>
<td colspan="3"><?php $coldisplay=$coldisplay+3; ?></td>
<?php
} }
if ($i < $num-1) {
print '<a class="lineupdown" href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=down&amp;rowid='.$line->id.'">';
echo img_down('default', 0, 'imgdownforline');
print '</a>';
}
print '</td>';
} else {
print '<td '.(($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"').'></td>';
$coldisplay++;
}
} else {
print '<td colspan="3"></td>';
$coldisplay=$coldisplay+3;
}
if($action == 'selectlines'){ ?> if ($action == 'selectlines') {
<td class="linecolcheck center"><input type="checkbox" class="linecheckbox" name="line_checkbox[<?php echo $i+1; ?>]" value="<?php echo $line->id; ?>" ></td> print '<td class="linecolcheck center">';
<?php } ?> print '<input type="checkbox" class="linecheckbox" name="line_checkbox['.($i+1).']" value="'.$line->id.'" >';
print '</td>';
}
</tr> print '</tr>';
<?php
//Line extrafield //Line extrafield
if (!empty($extrafields)) if (!empty($extrafields))
{ {
print $line->showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); print $line->showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
} }
?>
<!-- END PHP TEMPLATE objectline_view.tpl.php --> print "<!-- END PHP TEMPLATE objectline_view.tpl.php -->\n";

View File

@@ -155,8 +155,8 @@ $type='directory';
// This test if file exists should be useless. We keep it to find bug more easily // This test if file exists should be useless. We keep it to find bug more easily
if (! dol_is_dir($upload_dir)) if (! dol_is_dir($upload_dir))
{ {
// dol_mkdir($upload_dir); //dol_mkdir($upload_dir);
/* $langs->load("install"); /*$langs->load("install");
dol_print_error(0,$langs->trans("ErrorDirDoesNotExists",$upload_dir)); dol_print_error(0,$langs->trans("ErrorDirDoesNotExists",$upload_dir));
exit;*/ exit;*/
} }

View File

@@ -318,7 +318,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
else else
{ {
//issue the CKEditor Callback //issue the CKEditor Callback
SendCKEditorResults( SendCKEditorResults(
$CKEcallback, $CKEcallback,
$sFileUrl, $sFileUrl,
($sErrorNumber != 0 ? 'Error '. $sErrorNumber. ' upload failed.' : 'Upload Successful') ($sErrorNumber != 0 ? 'Error '. $sErrorNumber. ' upload failed.' : 'Upload Successful')

View File

@@ -140,5 +140,5 @@ if (! ($_SERVER['HTTP_REFERER'] === $dolibarr_main_url_root . '/' || $_SERVER['H
time_js_next_test += time_auto_update; time_js_next_test += time_auto_update;
console.log('Updated time_js_next_test. New value is '+time_js_next_test); console.log('Updated time_js_next_test. New value is '+time_js_next_test);
} }
<?php <?php
} }

View File

@@ -47,13 +47,13 @@ function bank_prepare_head(Account $object)
$head[$h][2] = 'journal'; $head[$h][2] = 'journal';
$h++; $h++;
// if ($conf->global->MAIN_FEATURES_LEVEL >= 1) // if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
// { // {
$head[$h][0] = DOL_URL_ROOT . "/compta/bank/treso.php?account=" . $object->id; $head[$h][0] = DOL_URL_ROOT . "/compta/bank/treso.php?account=" . $object->id;
$head[$h][1] = $langs->trans("PlannedTransactions"); $head[$h][1] = $langs->trans("PlannedTransactions");
$head[$h][2] = 'cash'; $head[$h][2] = 'cash';
$h++; $h++;
// } // }
$head[$h][0] = DOL_URL_ROOT . "/compta/bank/annuel.php?account=" . $object->id; $head[$h][0] = DOL_URL_ROOT . "/compta/bank/annuel.php?account=" . $object->id;
$head[$h][1] = $langs->trans("IOMonthlyReporting"); $head[$h][1] = $langs->trans("IOMonthlyReporting");

View File

@@ -876,7 +876,7 @@ function dol_string_unaccent($str)
else else
{ {
// See http://www.ascii-code.com/ // See http://www.ascii-code.com/
$string = strtr( $string = strtr(
$str, $str,
"\xC0\xC1\xC2\xC3\xC4\xC5\xC7 "\xC0\xC1\xC2\xC3\xC4\xC5\xC7
\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1 \xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1
@@ -5867,7 +5867,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
// Add SIGNATURE into substitutionarray first, so, when we will make the substitution, // Add SIGNATURE into substitutionarray first, so, when we will make the substitution,
// this will include signature content first and then replace var found into content of signature // this will include signature content first and then replace var found into content of signature
$signature = $user->signature; $signature = $user->signature;
$substitutionarray=array_merge($substitutionarray, array( $substitutionarray=array_merge($substitutionarray, array(
'__USER_SIGNATURE__' => (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : '') '__USER_SIGNATURE__' => (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : '')
) )
); );
@@ -5877,7 +5877,7 @@ $substitutionarray=array_merge($substitutionarray, array(
$substitutionarray['__SIGNATURE__'] = (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : ''); $substitutionarray['__SIGNATURE__'] = (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : '');
} }
$substitutionarray=array_merge($substitutionarray, array( $substitutionarray=array_merge($substitutionarray, array(
'__USER_ID__' => (string) $user->id, '__USER_ID__' => (string) $user->id,
'__USER_LOGIN__' => (string) $user->login, '__USER_LOGIN__' => (string) $user->login,
'__USER_LASTNAME__' => (string) $user->lastname, '__USER_LASTNAME__' => (string) $user->lastname,
@@ -5890,7 +5890,7 @@ $substitutionarray=array_merge($substitutionarray, array(
} }
if ((empty($exclude) || ! in_array('mycompany', $exclude)) && is_object($mysoc)) if ((empty($exclude) || ! in_array('mycompany', $exclude)) && is_object($mysoc))
{ {
$substitutionarray=array_merge($substitutionarray, array( $substitutionarray=array_merge($substitutionarray, array(
'__MYCOMPANY_NAME__' => $mysoc->name, '__MYCOMPANY_NAME__' => $mysoc->name,
'__MYCOMPANY_EMAIL__' => $mysoc->email, '__MYCOMPANY_EMAIL__' => $mysoc->email,
'__MYCOMPANY_PROFID1__' => $mysoc->idprof1, '__MYCOMPANY_PROFID1__' => $mysoc->idprof1,

View File

@@ -320,7 +320,7 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt
fwrite($fichier, $form); fwrite($fichier, $form);
$form='<description><![CDATA['.$desc.'.]]></description>'."\n". $form='<description><![CDATA['.$desc.'.]]></description>'."\n".
// '<language>fr</language>'."\n". // '<language>fr</language>'."\n".
'<copyright>Dolibarr</copyright>'."\n". '<copyright>Dolibarr</copyright>'."\n".
'<lastBuildDate>'.$date.'</lastBuildDate>'."\n". '<lastBuildDate>'.$date.'</lastBuildDate>'."\n".
'<generator>Dolibarr</generator>'."\n"; '<generator>Dolibarr</generator>'."\n";

View File

@@ -177,13 +177,13 @@ class InterfaceLogevents extends DolibarrTriggers
} }
// If not found // If not found
/* /*
else else
{ {
dol_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); dol_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action.");
return 0; return 0;
} }
*/ */
// Add more information into desc from the context property // Add more information into desc from the context property
if (! empty($desc) && ! empty($object->context['audit'])) $desc.=' - '.$object->context['audit']; if (! empty($desc) && ! empty($object->context['audit'])) $desc.=' - '.$object->context['audit'];

View File

@@ -181,7 +181,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers
case 'CONTACT_MODIFY': case 'CONTACT_MODIFY':
case 'CONTACT_DELETE': case 'CONTACT_DELETE':
case 'CONTACT_ENABLEDISABLE': case 'CONTACT_ENABLEDISABLE':
break;
// Products // Products
// case 'PRODUCT_CREATE': // case 'PRODUCT_CREATE':
// case 'PRODUCT_MODIFY': // case 'PRODUCT_MODIFY':
@@ -221,7 +221,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers
case 'LINEORDER_INSERT': case 'LINEORDER_INSERT':
case 'LINEORDER_UPDATE': case 'LINEORDER_UPDATE':
case 'LINEORDER_DELETE': case 'LINEORDER_DELETE':
break;
// Supplier orders // Supplier orders
// case 'ORDER_SUPPLIER_CREATE': // case 'ORDER_SUPPLIER_CREATE':
// case 'ORDER_SUPPLIER_CLONE': // case 'ORDER_SUPPLIER_CLONE':