Generalize $inputalsopricewithtax instead of MAIN_FEATURES_LEVEL>1
This commit is contained in:
parent
0ccd29c6cd
commit
154d1520fb
@ -48,7 +48,7 @@ abstract class CommonObject
|
|||||||
public $array_options=array();
|
public $array_options=array();
|
||||||
|
|
||||||
public $thirdparty;
|
public $thirdparty;
|
||||||
|
|
||||||
public $linkedObjectsIds; // Loaded by ->fetchObjectLinked
|
public $linkedObjectsIds; // Loaded by ->fetchObjectLinked
|
||||||
public $linkedObjects; // Loaded by ->fetchObjectLinked
|
public $linkedObjects; // Loaded by ->fetchObjectLinked
|
||||||
|
|
||||||
@ -2784,7 +2784,7 @@ abstract class CommonObject
|
|||||||
// Price HT
|
// Price HT
|
||||||
print '<td align="right" width="80"><label for="price_ht">'.$langs->trans('PriceUHT').'</label></td>';
|
print '<td align="right" width="80"><label for="price_ht">'.$langs->trans('PriceUHT').'</label></td>';
|
||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<td align="right" width="80"> </td>';
|
if ($inputalsopricewithtax) print '<td align="right" width="80"> </td>';
|
||||||
|
|
||||||
// Qty
|
// Qty
|
||||||
print '<td align="right" width="50"><label for="qty">'.$langs->trans('Qty').'</label></td>';
|
print '<td align="right" width="50"><label for="qty">'.$langs->trans('Qty').'</label></td>';
|
||||||
|
|||||||
@ -96,7 +96,7 @@ $coldisplay=-1; // We remove first td
|
|||||||
<td align="right"><?php $coldisplay++; ?><?php echo $form->load_tva('tva_tx',$line->tva_tx,$seller,$buyer,0,$line->info_bits,$line->product_type); ?></td>
|
<td align="right"><?php $coldisplay++; ?><?php echo $form->load_tva('tva_tx',$line->tva_tx,$seller,$buyer,0,$line->info_bits,$line->product_type); ?></td>
|
||||||
|
|
||||||
<td align="right"><?php $coldisplay++; ?><input type="text" class="flat" size="8" id="price_ht" name="price_ht" value="<?php echo price($line->subprice,0,'',0); ?>"></td>
|
<td align="right"><?php $coldisplay++; ?><input type="text" class="flat" size="8" id="price_ht" name="price_ht" value="<?php echo price($line->subprice,0,'',0); ?>"></td>
|
||||||
<?php if ($conf->global->MAIN_FEATURES_LEVEL > 1) { ?>
|
<?php if ($inputalsopricewithtax) { ?>
|
||||||
<td align="right"><?php $coldisplay++; ?><input type="text" class="flat" size="8" id="price_ttc" name="price_ttc" value="<?php echo price($pu_ttc,0,'',0); ?>"></td>
|
<td align="right"><?php $coldisplay++; ?><input type="text" class="flat" size="8" id="price_ttc" name="price_ttc" value="<?php echo price($pu_ttc,0,'',0); ?>"></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|||||||
@ -17,9 +17,27 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* To use this template, the following var must be defined
|
* Need to have following variables defined:
|
||||||
|
* $object (invoice, order, ...)
|
||||||
|
* $conf
|
||||||
|
* $langs
|
||||||
|
* $dateSelector
|
||||||
|
* $forceall (0 by default, 1 for supplier invoices/orders)
|
||||||
|
* $senderissupplier (0 by default, 1 for supplier invoices/orders)
|
||||||
|
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
|
||||||
|
*
|
||||||
* $type, $text, $description, $line
|
* $type, $text, $description, $line
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$usemargins=0;
|
||||||
|
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
|
||||||
|
|
||||||
|
global $forceall, $senderissupplier, $inputalsopricewithtax;
|
||||||
|
if (empty($dateSelector)) $dateSelector=0;
|
||||||
|
if (empty($forceall)) $forceall=0;
|
||||||
|
if (empty($senderissupplier)) $senderissupplier=0;
|
||||||
|
if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php $coldisplay=0; ?>
|
<?php $coldisplay=0; ?>
|
||||||
<!-- BEGIN PHP TEMPLATE objectline_view.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE objectline_view.tpl.php -->
|
||||||
@ -100,7 +118,7 @@
|
|||||||
|
|
||||||
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo price($line->subprice); ?></td>
|
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo price($line->subprice); ?></td>
|
||||||
|
|
||||||
<?php if ($conf->global->MAIN_FEATURES_LEVEL > 1) { ?>
|
<?php if ($inputalsopricewithtax) { ?>
|
||||||
<td align="right" class="nowrap"><?php $coldisplay++; ?> </td>
|
<td align="right" class="nowrap"><?php $coldisplay++; ?> </td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user