From 52ad5c5565a8b3eabb0e253d26fc2deec48a6dce Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 18 Oct 2018 12:21:39 +0200 Subject: [PATCH] New: works with variants: -To edit child price and weight impacts better to see in tab the father price and weight --- htdocs/variants/combinations.php | 60 ++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 848e5ee70fe..fb23921be25 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -318,6 +318,66 @@ if (! empty($id) || ! empty($ref)) dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', '', '', '', 0, '', '', 1); + print '
'; + + print '
'; + print ''; + + // TVA + print ''; + + // Price + print ''; + + // Price minimum + print ''; + + // Weight + print '\n"; + + + + + print "
' . $langs->trans("DefaultTaxRate") . ''; + + $positiverates=''; + if (price2num($object->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($object->tva_tx); + if (price2num($object->localtax1_type)) $positiverates.=($positiverates?'/':'').price2num($object->localtax1_tx); + if (price2num($object->localtax2_type)) $positiverates.=($positiverates?'/':'').price2num($object->localtax2_tx); + if (empty($positiverates)) $positiverates='0'; + echo vatrate($positiverates.($object->default_vat_code?' ('.$object->default_vat_code.')':''), '%', $object->tva_npr); + /* + if ($object->default_vat_code) + { + print vatrate($object->tva_tx, true) . ' ('.$object->default_vat_code.')'; + } + else print vatrate($object->tva_tx, true, $object->tva_npr, true);*/ + print '
' . $langs->trans("SellingPrice") . ''; + if ($object->price_base_type == 'TTC') { + print price($object->price_ttc) . ' ' . $langs->trans($object->price_base_type); + } else { + print price($object->price) . ' ' . $langs->trans($object->price_base_type); + } + print '
' . $langs->trans("MinPrice") . ''; + if ($object->price_base_type == 'TTC') { + print price($object->price_min_ttc) . ' ' . $langs->trans($object->price_base_type); + } else { + print price($object->price_min) . ' ' . $langs->trans($object->price_base_type); + } + print '
'.$langs->trans("Weight").''; + if ($object->weight != '') + { + print $object->weight." ".measuring_units_string($object->weight_units,"weight"); + } + else + { + print ' '; + } + print "
\n"; + + print '
'; + print '
'; + dol_fiche_end();