This commit is contained in:
Laurent Destailleur 2020-04-22 12:40:11 +02:00
parent d54c093ae2
commit 9a5986e190
2 changed files with 8 additions and 4 deletions

View File

@ -128,12 +128,16 @@ $coldisplay++;
print '<td class="nobottom nowrap linecollost right">'; print '<td class="nobottom nowrap linecollost right">';
print '<input type="text" size="1" name="efficiency" id="efficiency" class="flat right" value="'.$line->efficiency.'"></td>'; print '<input type="text" size="1" name="efficiency" id="efficiency" class="flat right" value="'.$line->efficiency.'"></td>';
$coldisplay++;
print '<td class="nobottom nowrap linecolcostprice right">';
print '</td>';
$coldisplay += $colspan; $coldisplay += $colspan;
print '<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.'">'; print '<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.'">';
$coldisplay += $colspan; $coldisplay += $colspan;
print '<input type="submit" class="button" id="savelinebutton marginbottomonly" name="save" value="'.$langs->trans("Save").'">'; print '<input type="submit" class="button buttongen marginbottomonly" id="savelinebutton marginbottomonly" name="save" value="'.$langs->trans("Save").'">';
print '<br>'; print '<br>';
print '<input type="submit" class="button" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" class="button buttongen marginbottomonly" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';

View File

@ -4663,9 +4663,9 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
/** /**
* Function that return a number with universal decimal format (decimal separator is '.') from an amount typed by a user. * Function that return a number with universal decimal format (decimal separator is '.') from an amount typed by a user.
* Function to use on each input amount before any numeric test or database insert. A better name for this function * Function to use on each input amount before any numeric test or database insert. A better name for this function
* should be text2num(). * should be roundtext2num().
* *
* @param float $amount Amount to convert/clean * @param float $amount Amount to convert/clean or round
* @param string $rounding ''=No rounding * @param string $rounding ''=No rounding
* 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT) * 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT)
* 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT) * 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT)