2
0
forked from Wavyzz/dolibarr

Enable extrafields for customer order, proposal and invoice lines. This

feature was developed for 3.5 but was disabled (hidden) because of
a bug not possible to fix enough quickly for 3.5.0 release.
This commit is contained in:
Laurent Destailleur
2014-02-16 23:51:29 +01:00
parent 935b30470d
commit abc96b51fa
11 changed files with 62 additions and 50 deletions

View File

@@ -126,13 +126,20 @@ else {
<input type="text" size="5" name="buying_price" class="flat" value="<?php echo (isset($_POST["buying_price"])?$_POST["buying_price"]:''); ?>">
</td>
<?php
$colspan++;
$coldisplay++;
if ($user->rights->margins->creer)
{
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) {
echo '<td align="right" class="nowrap"><input type="text" size="2" name="np_marginRate" value="'.(isset($_POST["np_marginRate"])?$_POST["np_marginRate"]:'').'"><span class="hideonsmartphone">%</span></td>';
$colspan++;
$coldisplay++;
}
if (! empty($conf->global->DISPLAY_MARK_RATES)) {
echo '<td align="right" class="nowrap"><input type="text" size="2" name="np_markRate" value="'.(isset($_POST["np_markRate"])?$_POST["np_markRate"]:'').'"><span class="hideonsmartphone">%</span></td>';
$colspan++;
$coldisplay++;
}
}
else
@@ -164,7 +171,7 @@ else {
$newline = new FactureLigne($this->db);
}
if (is_object($newline)) {
print $newline->showOptionals($extrafieldsline,'edit',array('style'=>$bcnd[$var],'colspan'=>$coldisplay+8));
print $newline->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay+8));
}
}
?>

View File

@@ -134,13 +134,20 @@ else {
<input type="text" size="5" id="buying_price_predef" name="buying_price_predef" class="flat" value="<?php echo (isset($_POST["buying_price_predef"])?$_POST["buying_price_predef"]:''); ?>">
</td>
<?php
$colspan++;
$coldisplay++;
if ($user->rights->margins->creer)
{
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) {
echo '<td align="right"><input type="text" size="2" name="np_marginRate_predef" value="'.(isset($_POST["np_marginRate_predef"])?$_POST["np_marginRate_predef"]:'').'">%</td>';
$colspan++;
$coldisplay++;
}
if (! empty($conf->global->DISPLAY_MARK_RATES)) {
echo '<td align="right"><input type="text" size="2" name="np_markRate_predef" value="'.(isset($_POST["np_markRate_predef"])?$_POST["np_markRate_predef"]:'').'">%</td>';
$colspan++;
$coldisplay++;
}
}
else
@@ -172,7 +179,7 @@ else {
$newline = new FactureLigne($this->db);
}
if (is_object($newline)) {
print $newline->showOptionals($extrafieldsline,'edit',array('style'=>$bcnd[$var],'colspan'=>$coldisplay+5));
print $newline->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var],'colspan'=>$coldisplay+5), '_predef');
}
}
?>