forked from Wavyzz/dolibarr
Fix multicurrency not yet supported on contracts
This commit is contained in:
@@ -1559,9 +1559,9 @@ else
|
||||
print '<td>'.$langs->trans("ServiceNb", $cursorline).'</td>';
|
||||
print '<td width="80" class="center">'.$langs->trans("VAT").'</td>';
|
||||
print '<td width="80" class="right">'.$langs->trans("PriceUHT").'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) {
|
||||
print '<td width="80" class="right">'.$langs->trans("PriceUHTCurrency").'</td>';
|
||||
}
|
||||
//if (!empty($conf->multicurrency->enabled)) {
|
||||
// print '<td width="80" class="right">'.$langs->trans("PriceUHTCurrency").'</td>';
|
||||
//}
|
||||
print '<td width="30" class="center">'.$langs->trans("Qty").'</td>';
|
||||
if ($conf->global->PRODUCT_USE_UNITS) print '<td width="30" class="left">'.$langs->trans("Unit").'</td>';
|
||||
print '<td width="50" class="right">'.$langs->trans("ReductionShort").'</td>';
|
||||
@@ -1571,8 +1571,7 @@ else
|
||||
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
//
|
||||
|
||||
// Line in view mode
|
||||
if ($action != 'editline' || GETPOST('rowid') != $objp->rowid)
|
||||
{
|
||||
print '<tr class="tdtop oddeven">';
|
||||
@@ -1608,21 +1607,21 @@ else
|
||||
{
|
||||
print '<td>'.img_object($langs->trans("ShowProductOrService"), ($objp->product_type ? 'service' : 'product')).' '.dol_htmlentitiesbr($objp->description)."</td>\n";
|
||||
}
|
||||
// TVA
|
||||
// VAT
|
||||
print '<td class="center">';
|
||||
print vatrate($objp->tva_tx.($objp->vat_src_code?(' ('.$objp->vat_src_code.')'):''), '%', $objp->info_bits);
|
||||
print '</td>';
|
||||
// Price
|
||||
print '<td class="right">'.($objp->subprice != '' ? price($objp->subprice) : '')."</td>\n";
|
||||
// Price multicurrency
|
||||
if (!empty($conf->multicurrency->enabled)) {
|
||||
/*if (!empty($conf->multicurrency->enabled)) {
|
||||
print '<td class="linecoluht_currency nowrap right">'.price($objp->multicurrency_subprice).'</td>';
|
||||
}
|
||||
// Quantite
|
||||
}*/
|
||||
// Quantity
|
||||
print '<td class="center">'.$objp->qty.'</td>';
|
||||
// Unit
|
||||
if($conf->global->PRODUCT_USE_UNITS) print '<td class="left">'.$langs->trans($object->lines[$cursorline-1]->getLabelOfUnit()).'</td>';
|
||||
// Remise
|
||||
// Discount
|
||||
if ($objp->remise_percent > 0)
|
||||
{
|
||||
print '<td class="right">'.$objp->remise_percent."%</td>\n";
|
||||
@@ -1711,7 +1710,7 @@ else
|
||||
print $line->showOptionals($extrafields, 'view', array('style'=>'class="oddeven"', 'colspan'=>$colspan), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
||||
}
|
||||
}
|
||||
// Ligne en mode update
|
||||
// Line in mode update
|
||||
else
|
||||
{
|
||||
// Ligne carac
|
||||
@@ -1741,18 +1740,34 @@ else
|
||||
$doleditor->Create();
|
||||
|
||||
print '</td>';
|
||||
|
||||
// VAT
|
||||
print '<td class="right">';
|
||||
print $form->load_tva("eltva_tx", $objp->tva_tx.($objp->vat_src_code?(' ('.$objp->vat_src_code.')'):''), $mysoc, $object->thirdparty, $objp->fk_product, $objp->info_bits, $objp->product_type, 0, 1);
|
||||
print '</td>';
|
||||
|
||||
// Price
|
||||
print '<td class="right"><input size="5" type="text" name="elprice" value="'.price($objp->subprice).'"></td>';
|
||||
|
||||
// Price multicurrency
|
||||
/*if (!empty($conf->multicurrency->enabled)) {
|
||||
print '<td class="linecoluht_currency nowrap right">'.price($objp->multicurrency_subprice).'</td>';
|
||||
}*/
|
||||
|
||||
// Quantity
|
||||
print '<td class="center"><input size="2" type="text" name="elqty" value="'.$objp->qty.'"></td>';
|
||||
|
||||
// Unit
|
||||
if ($conf->global->PRODUCT_USE_UNITS)
|
||||
{
|
||||
print '<td class="left">';
|
||||
print $form->selectUnits($objp->fk_unit, "unit");
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Discount
|
||||
print '<td class="nowrap right"><input size="1" type="text" name="elremise_percent" value="'.$objp->remise_percent.'">%</td>';
|
||||
|
||||
if (! empty($usemargins))
|
||||
{
|
||||
print '<td class="right">';
|
||||
@@ -2063,6 +2078,7 @@ else
|
||||
if ($action != 'editline')
|
||||
{
|
||||
$forcetoshowtitlelines=1;
|
||||
if (empty($object->multicurrency_code)) $object->multicurrency_code = $conf->currency; // TODO Remove this when multicurrency supported on contracts
|
||||
|
||||
// Add free products/services
|
||||
$object->formAddObjectLine(1, $mysoc, $soc);
|
||||
|
||||
Reference in New Issue
Block a user